Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm having trouble gaining SSH access to my new server. I currently have one server set up working the way I want it to, and I'm trying to get a different one to work the same way. I've copied my users files (/etc/passwd, /etc/shadow, /etc/group, and /etc/gshadow) and the /home folders (including /home/*/.ssh). I even added a new user (testuser) on the new machine and am using that to test the ssh settings. Both /etc/ssh/sshd_config and /etc/ssh/ssh_config are the same, as are the iptables rules.

When I try to use PuTTY to log in to the new server using a copy of the settings from the old server (except for address, of course) I get an error:

Disconnected: No supported authentication methods available

And in the /var/log/secure file I get the line:

sshd[6562]: Received disconnect from xxx.xxx.xxx.xxx: 14: No supported authentication methods available

Both old and new server are running centOS

Where else can I find configurations that might be off?

Thanks.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Doesn't look like a firewall/ipteables issue. More likely you have either broken your passwd/shadow config (perhaps the new machine uses a different password hashing) or ssh is configured to allow key authentication only, not password.

share|improve this answer
    
Both the old and new servers use only key authentication. The passwd/shadow files were copied as-is, and then just to be sure I did useradd tempuser and copied the .ssh folder from my old home directory to this directory. I copied /etc/ssh/sshd_config from the old machine to the new, and ran service sshd restart. Am I missing anything? –  Max Jun 9 '11 at 12:14
    
Permissions on the /home/username/.ssh/ directory and files in it? –  HampusLi Jun 9 '11 at 12:15
    
It was permissions!!!! Thank you! I guess when I copied everything I was root, so I went through and chowned everything back to what it needed to be. Thanks! –  Max Jun 9 '11 at 12:23

Maybe PAM authentication settings differ? Look in /etc/pam.d/ and /etc/security/.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.