Hi,
I am not able to give the password in Unix script for SFTP connection.
When I am trying to manully SFTP command for accessing the server , it asking for pwd and I could provide the pwd but I am not getting how to provide the pwd inside the Unix script.
Code:
sftp -v user@xyz.com.
This command is working but how to pass password for connecting the server via Unix bash script.
B
SFTP 40 weeks 18 hours ago How to use SFTP to get the files on unix server from anoter unix server without sending the password.
This is below script wrote
------------------------------------
#!/bin/ksh
#!/usr/local/bin/expect
sftp -oPort=<PORt_number> <Ipaddress> <<EOF
expect "password:"
send <password>
cd /test/test1
mget *.csv
bye
EOF
---------------------------------------
after runni
I have read documentation on SCP and just trying to figure out how go about doing this - below are two pieces of code, one is SFTP and one is SCP. My goal is to have this done via password-less authentication, fully automated.
Hi Guys,
I need to know how can i achieve SFTP "with" password in a shell script.
I have already done passwordless key generation thing and it is working but at the moment i am interested in passing a password.
And another question I have is say i have a.ksh and b.sh scripts...Can i invoke a.ksh in b.sh
Regards
Arpit
Hi,
I was provided with sftp servername, user and password and the requirement is to connect to sftp server using credentials provided and drop the file.
Manually i am able to connect with commands like
sftp user@servername
and after clicking enter, i was asked for a password and entering the password i am able to get it the remote server.
How can i do the same using scripts i.e when i execute
Hi
I've been searching the web for a solution (to the above subject) and found something that seems to do the job. Here's the link:
How to restrict users to SFTP only instead of SSH
I've tested this on a Solaris 10 VM before rolling it out on the server.
SFTP works fine.
I want a file to be uploaded daily to remote server using automated ftp command.
I have the below code for ftping a file
Code:
sftp "ogl@serverna,me"ogl@serverna,me <<EOF
cd $path_on_the_server
binary
put $path_on_my_sever/filename.txt
bye
EOF
Not sure is this works.but when i tried its asking for password .How i can avoid asking password and provide it in the script.Please let me know.
Moderator's Comments:
I'm trying to write a shell script to transfer files to a remote windows machine which is running a ultra simple sftp server .
So i don't have the option of using public key authentication.
From the Linux end its a stripped down version for non intel platform , So if i want to use "expect" i cant install expect/tcl/tk.