LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-15-2010, 05:43 PM   #1
bobsmith5002
LQ Newbie
 
Registered: May 2009
Posts: 5

Rep: Reputation: 0
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.
 
Old 11-15-2010, 06:41 PM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ssh Connection reset by peer -- Suggestions for getting debug messages? pcardout Linux - Networking 5 07-06-2012 03:51 AM
Cannot ssh into RHEL 5.5 server unless SSHD server debug is enabled tclappsdba Linux - Newbie 6 08-11-2010 03:56 PM
SSH debug : client_input_channel_req jonaskellens Linux - Newbie 1 10-07-2009 05:00 AM
How to debug without having debug section in an executable ? unclesam Linux - Newbie 0 02-02-2006 07:23 AM
[debug]what does the following debug information mean icoming Programming 21 06-08-2004 03:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration