You are not logged in.

#1 2011-11-29 10:07:44

sysrez
Member
From: Sankt-Petersburg
Registered: 2011-08-03
Posts: 18

ssh key copy

I frequently ssh into my server, on my old Debian setup I used to just ssh-copy-id username@serveraddress and I would never have to enter the password again, this was especially useful for having a start up script to automatically mount a directory using sshfs. But for some strange reason, I can't get this working in Arch? I still have to enter my password every time.

Both user names on both machines are the same, although I doubt it, could that be a problem?

Offline

#2 2011-11-29 10:20:46

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: ssh key copy

Use one or more '-v' flags to get more info when attempting to connect.

I've always done this manually, and it worked fine - didn't even know about this script. smile Maybe try it manually yourself, just to make sure the script isn't the problem?

Offline

#3 2011-11-29 10:30:30

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: ssh key copy

Are you sure it's not asking for the key pass-phrase, not the password on the remote host?
It shouldn't just not ask for a password unless you're using something like ssh-agent or your key has no pass-phrase, to the best of my knowledge.

Offline

#4 2011-12-03 09:33:17

sysrez
Member
From: Sankt-Petersburg
Registered: 2011-08-03
Posts: 18

Re: ssh key copy

[sysrez@myhost ~]$ ssh -v sysrez@192.168.1.7
OpenSSH_5.9p1, OpenSSL 1.0.0e 6 Sep 2011
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 192.168.1.7 [192.168.1.7] port 22.
debug1: Connection established.
debug1: identity file /home/sysrez/.ssh/id_rsa type 1
debug1: identity file /home/sysrez/.ssh/id_rsa-cert type -1
debug1: identity file /home/sysrez/.ssh/id_dsa type -1
debug1: identity file /home/sysrez/.ssh/id_dsa-cert type -1
debug1: identity file /home/sysrez/.ssh/id_ecdsa type -1
debug1: identity file /home/sysrez/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-6+squeeze1
debug1: match: OpenSSH_5.5p1 Debian-6+squeeze1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA ********************************
debug1: Host '192.168.1.7' is known and matches the RSA host key.
debug1: Found key in /home/sysrez/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/sasha/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/sasha/.ssh/id_dsa
debug1: Trying private key: /home/sasha/.ssh/id_ecdsa
debug1: Next authentication method: password

My key also has no pass-phrase.

Last edited by sysrez (2011-12-03 11:14:15)

Offline

#5 2011-12-05 10:15:41

sysrez
Member
From: Sankt-Petersburg
Registered: 2011-08-03
Posts: 18

Re: ssh key copy

bump

Offline

#6 2011-12-05 10:53:00

echo.unity
Member
Registered: 2011-11-14
Posts: 68

Re: ssh key copy

Just regenerate keys - check you sshd_config for PasswordAuthentication and ChallengeResponse, I am going off the top of my head right now but there are plenty of how-to's on the web.

Offline

#7 2011-12-06 01:26:54

sysrez
Member
From: Sankt-Petersburg
Registered: 2011-08-03
Posts: 18

Re: ssh key copy

I've tried that.

I'll look into the sshd_config, thanks.

And I know there are plenty of how-to's, but that's not what I'm looking for, they are all the same, and I know how to set it up, but I've ran into a problem and now I'm asking for a bit of help.

Offline

Board footer

Powered by FluxBB