I need to transfer a log file to a remote host using sftp from a Linux host. I have been provided credentials for the same from my operations group. However, since I don\'t
I was recently asked to switch over from ftp to sftp, in order to secure the file transmission between servers. We are using Tectia SSH package, which has an option --password
to pass the password on the command line.
example : sftp --password="password" "userid"@"servername"
Batch example :
(
echo "
ascii
cd pub
lcd dir_name
put filename
close
quit
"
) | sftp --password="password" "userid"@"servername"
I thought I should share this information, since I was looking at various websites, before running the help command (sftp -h
), and was i surprised to see the password option.