Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have Linux console, managed from Windows.

Can login to Linux console from MSTSC service of Windows, as xrdp is installed on Linux.
However I cannot login via Putty with SSH connection. It's displaying error as 'Access denied'.

This error started to occur after I abruptly stopped the execution of rsync operation with Ctrl+C which I started from Putty.

Logging in as user: root
Operating System: Fedora 13

What might have gone wrong?

share|improve this question
1  
Have you tried restarting the ssh service on the Linux box? Try sudo service ssh restart –  terdon Feb 20 at 14:24
    
what did you run rsync on? you might have overwritten some configuration (or changed some permissions in the home-directory) that now prevents you from logging in. –  umläute Feb 20 at 14:52
    
@terdon bash: service: command not found –  Abhishek Madhani Feb 20 at 15:58
    
@umläute I was running rsync to backup mounted directory on same box –  Abhishek Madhani Feb 20 at 15:58
    
Did you run the service command with sudo? Also try (as root or with sudo) /etc/init.d/ssh restart –  terdon Feb 20 at 15:59
show 1 more comment

3 Answers

up vote 4 down vote accepted

Go in through your MSTSC connection to xrdp and from within there restart your SSH daemon service.

$sudo /etc/init.d/sshd restart

-or-

$ sudo service sshd restart

If the problem continues then I'd consult the log file /var/log/secure to see if you can see if it's an authentication issue. You can consult the log file /var/log/messages to confirm that the SSH service is functioning normally as well.

EDIT #1

Based on a comment from the OP, "..Failed password for root from 192.168.4.190 port 50677.." it looks like it could be the root user's password isn't what you think. Again using your MSTSC access via xrdp I'd confirm that you can su - and login as root.

If you can then the issue likely lies with either something in your /etc/ssh/sshd_config file not allowing either user root access or the IP you're attempting to connect from might not be allowed access. I would expect different messaging in the /var/log/* log files however, but these are 2 additional leads to follow-up on.

share|improve this answer
    
I did try your service command but to no avail. and yes /var/log/secure display following messages Feb 20 21:21:36 localhost sshd[31052]: Server listening on 0.0.0.0 port 22. Feb 20 21:21:36 localhost sshd[31052]: Server listening on :: port 22. Feb 20 21:22:39 localhost sshd[31054]: Failed password for root from 192.168.4.190 port 50677 ssh2 Feb 20 21:27:55 localhost sshd[31062]: Failed password for root from 192.168.4.190 port 50699 ssh2 –  Abhishek Madhani Feb 20 at 15:55
    
@AbhishekMadhani - see updates. –  slm Feb 20 at 16:03
    
Thanks, eventually it worked by restarting the console. –  Abhishek Madhani Feb 27 at 14:49
add comment

ssh is configured with /etc/ssh/sshd_config it is possible to disable root from login via ssh in there. This question has answers that might help too.

Permit root to login via ssh only with key-based authentication

and this opposite question also provides some answers.

How do I disable remote root login via ssh?

share|improve this answer
    
Thanks I did try before posting the question. –  Abhishek Madhani Feb 20 at 15:56
add comment

failed password, maybe mistyped? shiftlock, wrong keyboard .. try typing it in a text editor.

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.