Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

We have more than 500 systems running ubuntu. When i access a machine through ssh few machines are not getting logged in, rest of the machines are logging in successfully. I am entering the correct username and password. Eventhough it is not getting connected. Pls look at the below snapshot.

ssh error

Pls see the output in the following link.

http://paste.ubuntu.com/611748/

share|improve this question
4  
try using "ssh -v" so that you can see and paste more debug information –  freethinker May 23 '11 at 9:10
5  
If you have access to the remote machine, /var/log/auth.log would be interesting too. –  htorque May 23 '11 at 9:16
2  
@karthick87 and you might want to remove the IP adres in the top bar too ;) –  Rinzwind May 23 '11 at 9:18
1  
You'd better switch from password to keybased authentication, it makes administration much safer and easier. Easier because you can use ssh-keyadd to store password-protected keyfiles. Safer because brute-forcing is less feasible. –  Lekensteyn May 23 '11 at 9:36
    
Also check if the permissions are set right on the remote system. File permissions that is. –  con-f-use May 23 '11 at 10:24
show 2 more comments

2 Answers

up vote 2 down vote accepted

check the contents of /etc/ssh/sshd_config on the target machine - it is possible that your specific user is not permitted to log in remotely. Specific lines to check for:

PermitRootLogin no # should never allow remote root login

AllowUsers someusername # whitelist of users who are allowed to ssh to the machine

You can probably do a comparison of that file from one of the working machines to see if any lines are different.

share|improve this answer
    
I just want to give ssh rights to only one IP address say '172.29.32.9' so how can i do this? Also i would like to display some warning messages if some one ssh into the sytem. –  karthick87 Jun 3 '11 at 21:38
add comment

Apart from ssh -v, Try ssh -vv, ssh -vvv to increase verbosity of error messages to figure out what is happening.

If all cases fails,

Try from other servers to login as 'ssh username@host' and try other usernames as 'ssh username1@host'

if you can login to console, try 'ssh 0' from same system so that you can check if ssh subsystem works fine.

If ssh 0 works, ssh subsystem is fine. If not, Try to restart ssh subsystem

sudo /etc/init.d/ssh restart
share|improve this answer
add comment

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.