LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ssh debug (https://www.linuxquestions.org/questions/linux-newbie-8/ssh-debug-844443/)

bobsmith5002 11-15-2010 04:43 PM

ssh debug
 
Hi. I am trying to debug ssh permissions and keys. I am able to connect as root. However, I am unable to login as a new user (e.g., newuser). I have been trying to ssh as localhost to debug the issue. For example:

>ssh -vvvv newuser@localhost

will yield a lot of information. I think this is the relevant section, however, I am unable to resolve:

debug1: Host 'localhost' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:2
debug2: bits set: 533/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /root/.ssh/id_rsa ((nil))
debug2: key: /root/.ssh/id_dsa ((nil))
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/id_rsa
debug3: no such identity: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug3: no such identity: /root/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.

Do I need to transfer keys to /root/.ssh ? Any feedback is greatly appreciated.

Hangdog42 11-15-2010 05:41 PM

Welcome to LQ!

Quote:

I am unable to login as a new user (e.g., newuser). I have been trying to ssh as localhost to debug the issue.
I suspect that using localhost is confusing things a bit. The ssh server is expecting the public key to be in the home directory of the login (in the case /home/newuser/.ssh) and the private key to be in the home directory of the client. I'm guessing that even though your using ssh newuser@localhost, since your in root, it is looking in /root/.ssh and the key's don't match. However, a much more definitive answer is likely to be in the server log files. You don't say what distro you're using, but look at the files in /var/log and see if sshd is complaining about this.


All times are GMT -5. The time now is 06:28 PM.