On Wed, December 12, 2018 16:40, Gary Braatz wrote:
Inclusion of the -i flag and the location of the private key solved the problem.
You can also set up a personalised ssh config file in the ~/.ssh directory of the user employed to establish the sftp/ssh connections:
#BOF # /home/myuser/.ssh/config
# Host parameter is any arbitrary string. # sftp remoteuserid@first.site.com == Host site1 HostName first.site.com User remoteuserid IdentityFile /home/myuser/.ssh/id_rsa
# sftp otheruserid@second.other.com == Host site2 HostName second.other.com User otheruserid IdentityFile /home/myuser/.ssh/rsa_vendor2 #EOF
Then just run 'sftp site1' or 'sftp site2' to connect as required.