Still prompted for a password using sftp

passwordsftp

  1. The remote system has the public key.

  2. My .ssh/config file reads as follows:

 Host     fubar
 Hostname fubar.ip.address.here
 User     fubar_userid   
 Port     22
  1. known_hosts entry: (same ip address as used #2)

    fubar.ip.address.here ssh-rsa BLAH_BLAH_key…..

Results of command:

$>sftp fubar
Connecting to fubar ....
fubar@fubar.ip.address.here's password:

Questions:
Why am I stil prompted for a password?
What do I need to change to connect using keys and not get propmted for a password?

Best Answer

It's not clear to me if you're trying to set up SSH keys. Have a look here for directions on how to do that.

Pay special attention to the part where you enter a passphrase. If you do not leave it empty, then you will still need to enter that passphrase when you want to connect. You might be asking yourself "OK, why go to all that trouble if I still need to enter a passphrase?" The answer is that this particular passphrase is to decrypt your local key when you want to use it. The passphrase never traverses the wire to the server, even in hashed form. You would want to use a passphrase if this is on a machine where someone else has root access (such as a hosted server), because if someone else gets your key, they would not be able to use it without decrypting it. However, if this is on your own local machine where only you have access, then you can consider it safe to leave the passphrase blank. That way, you can SSH or SFTP without ever being prompted.