ewessel
asked on
SFTP connection without password prompt?
I am trying to connect our server to another via SFTP to send files securely, and I would like to automate this connection. Whenever I connect to the remote server with the username assigned to us by the remote administrators, it always asks for a password to log in, which the user must enter manually. Is there a way to set up the connection so we do not have to put in a password all the time? I have read some of the documentation on ssh and sftp, and tried generating a public key based on a private key we already use for one trading partner, then placing this public key in a .ssh directory on the remote server as a 'authorized_keys' file, but it still asks for the password, even if I use a -o 'IdentityFile _filename_' in the sftp command. any help would be appreciated..
ASKER
I didn't put a passphrase in when generating the key, so that's not the issue. I'm not sure what version of ssh the server is using, I know our side should be using OpenSSH, being a RHEL3 server.. Should I find that out first? I originally just generated a RSA key..
ASKER
Ok, If found out that it will allow a passwordless sftp connection if I am logged in as root and use the 'IdentityFile _filename_' option, but if I am looged in as a user and use the same thing it asks for a password. Any other ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you have tried generating the ssh-key, the main thing is that when you use ssh-keygen, it will ask for a passphrase, just press enter without typing any passphrase so that it won't ask for a passphrase when you use sftp.