Tag Archives: sshd

Fixing access denied error from Linux Server

You attempt to access a remote Linux machine and receive the following error after logon attempt with correct username/password combination.  This indicates that the machine is not accepting password authentication as an access method.   To resolve this issue, perform the following change to sshd_config file as follows:

 

Error:

 

login as: root

root@192.168.1.220’s password:

Access denied

root@192.168.1.220’s password:

 

 

Steps to resolve this issue:

  1. Logon directly to Linux console as the root user.
  2. Change directory to /etc/ssh

[root@oel1 ~]# cd /etc/ssh

  1. Open the file sshd_config

[root@oel1 ssh]# vi sshd_config

  1. Change the line <PasswordAuthentication no> to read <PasswordAuthentication yes>
  2. Stop the sshd service

[root@oel1 ssh]# service sshd stop

Stopping sshd:                                            [  OK  ]

[root@oel1 ssh]#

  1. Start the sshd service

[root@oel1 ssh]# service sshd start

Starting sshd:                                            [  OK  ]

[root@oel1 ssh]#

  1. Attempt to connect with username / password combination.

[root@oel1 ssh]# ssh 192.168.1.220

The authenticity of host ‘192.168.1.220 (192.168.1.220)’ can’t be established.

RSA key fingerprint is 74:e4:db:67:e9:7e:81:6f:dc:16:1d:06:25:7e:20:ae.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added ‘192.168.1.220’ (RSA) to the list of known hosts.

Password:

Last login: Thu Oct  3 11:09:46 2013 from 192.168.1.78

[root@oel1 ~]#

 

You have successfully logon with username and password.

 

Larry Catt