[gentoo-user] ssh Failed to add the host to the list of known hosts

2007-05-22 Thread Denis

For some reason, my SSH (openssh-4.5_p1-r1) refuses to remember any
hosts I connect to, and even if I keep connecting to the same machine
over and over, it still wants me to OK the RSA fingerprint manually.

Here's the verbose output when I try to connect to a known machine:

ssh -v XX.xx.xxx
OpenSSH_4.5p1, OpenSSL 0.9.8d 28 Sep 2006
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to XX.xx.xxx [xxx.xxx.xx.xx] port 22.
debug1: Connection established.
debug1: identity file /home/myuser/.ssh/identity type -1
debug1: identity file /home/myuser/.ssh/id_rsa type -1
debug1: identity file /home/myuser/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.5p1
debug1: match: OpenSSH_3.5p1 pat OpenSSH_3.*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server-client aes128-cbc hmac-md5 none
debug1: kex: client-server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(102410248192) 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
The authenticity of host 'XX.xx.xxx (xxx.xxx.xx.xx)' can't be
established.
RSA key fingerprint is (SOME RSA KEY GOES HERE)
Are you sure you want to continue connecting (yes/no)? yes

Failed to add the host to the list of known hosts
(/home/myuser/.ssh/known_hosts).

debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue:
publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/myuser/.ssh/identity
debug1: Trying private key: /home/myuser/.ssh/id_rsa
debug1: Trying private key: /home/myuser/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue:
publickey,password,keyboard-interactive
debug1: Next authentication method: password

It would not create any files under my /home/myuser/.ssh/ directory.
When I tried to create a file there manually, it said permission
denied.

Do I need to be added to some group to fix these permissions?
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] ssh Failed to add the host to the list of known hosts

2007-05-22 Thread Arturo 'Buanzo' Busleiman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Denis wrote:
 Do I need to be added to some group to fix these permissions?

ls -ld /home/username/.ssh should say that the dir belongs to username, and 
have rwx permissions
for it. You probably moved your home directory using root, or something like 
that.

chown username: /home/username/.ssh
chown username: /home/username/.ssh/*
chmod 700 /home/username/.ssh
chmod 600 /home/username.ssh/*

do that with root if you can.

- --
Arturo Buanzo Busleiman - Consultor Independiente en Seguridad Informatica
OpenPGP for HTTP: New Web-Auth Scheme: http://freshmeat.net/articles/view/2599
Consulting and Secure Mail Hosting: http://www.buanzo.com.ar/pro/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGU0MzAlpOsGhXcE0RCpF1AJwK79lu6W5Nl7KTFIwFBcC/hI7o5wCfa29s
ZxaW7vdWIwXwF/MYSSD5FCo=
=ZoZu
-END PGP SIGNATURE-
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] ssh Failed to add the host to the list of known hosts

2007-05-22 Thread Denis

You probably moved your home directory using root, or something like that.


I don't remember doing that, but maybe I missed something during an
install, who knows...


chown username: /home/username/.ssh
chown username: /home/username/.ssh/*
chmod 700 /home/username/.ssh
chmod 600 /home/username.ssh/*


Yep, this solved it.  I just wasn't sure if the user was supposed to
belong to some group for this to work automatically, but I guess
not...

Thanks!
--
[EMAIL PROTECTED] mailing list