SFTP command with certificate authentication

Hello list,

I am attempting to connect from a Redhat 6 machine to another linux machine. When I use the SSH command and specify my private key to use this it all connects fine, however there doesn't seem to be an option in the SFTP command to specify my private key for authentication.

In cygwin for windows I can just use the -i switch as follows:

sftp -i c:\cygwin\home\sshkeys\private_key user@sftpserver

However the -i switch doesn't seem to exist in Redhat/CentOS 6.

Can anyone shed some light on how I can get the same functionality to work from Redhat?

thanks

Try this:

sftp -oIdentityFile=/your/private/key user@sftpserver
1 Like

it works!