1

I would like to be able to access my home machine's account over ssh from a remote desktop. It allows me to connect when I say ssh uname@ip_addr, but it then prompts for a password.

This account has no password set up. Is there some way to simply connect with no password? Any help would be appreciated. (A reference to a line on a man page or would be an acceptable answer.)

kingsfoil
  • 133
  • 1
  • 7

2 Answers2

1

You could use authorized keys. Enable it in sshd_config

#AuthorizedKeysFile %h/.ssh/authorized_keys

then: if you allready have you have your rsa.pub, in case:

reach your youser's home .ssh

cd ~/.ssh

generate your rsa keypair

ssh-keygen -t rsa

append your id_rsa.pub to remote user's authorized_keys and login

user1293137
  • 1,692
  • 1
  • 11
  • 5
  • I'm curious if you have tried this and got it working. I just tried it on my system, and it still asked me for a password. – spuder Aug 08 '13 at 20:53
  • 1
    @spuder, trying using -v to get more information, and checking ssh logs on both systems. Chances are it'll tell you what ssh is upset about. – Winston Ewert Aug 08 '13 at 21:56
  • @spuder [Usually, it's a permission problem.](http://unix.stackexchange.com/questions/16978/how-to-make-password-less-login-work) – Gilles 'SO- stop being evil' Aug 08 '13 at 23:26
  • @spunder, can you do ssh to your account on the same machine, most of distros don't allow you ssh to an account with empty password – number5 Aug 09 '13 at 02:11
  • Checked and it's working (local on local) on ubuntu 12.some. I'll check again on a remote srv. – user1293137 Aug 09 '13 at 06:07
0

Make sure to have these settings in /etc/ssh/sshd_config:

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile  %h/.ssh/authorized_keys
PasswordAuthentication no

Of course, you will have to setup a public key on your server and save it as ~/.ssh/authorized_keys and use the private key generated to login - there are several tutorials online detailing this process. Once this is setup, you can SSH to your remote machine like this:

ssh -i /path/to/private/key user@hostname

hesson
  • 101
  • 3