Trouble Shoot Unable to Login As Root Through SSH

 mohammedrafi@NOC-RAFI:~$ ssh -v root@192.169.170.133

OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.169.170.133 [192.169.170.133] port 22.
debug1: Connection established.
debug1: identity file /home/mohammedrafi/.ssh/id_rsa type 1
debug1: identity file /home/mohammedrafi/.ssh/id_rsa-cert type -1
debug1: identity file /home/mohammedrafi/.ssh/id_dsa type -1
debug1: identity file /home/mohammedrafi/.ssh/id_dsa-cert type -1
debug1: identity file /home/mohammedrafi/.ssh/id_ecdsa type -1
debug1: identity file /home/mohammedrafi/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/mohammedrafi/.ssh/id_ed25519 type -1
debug1: identity file /home/mohammedrafi/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 6f:b7:c4:d4:63:11:ec:20:20:57:98:f6:06:2d:00:75
debug1: Host ‘192.169.170.133’ is known and matches the ECDSA host key.
debug1: Found key in /home/mohammedrafi/.ssh/known_hosts:64
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure.  Minor code may provide more information
No Kerberos credentials available

debug1: Unspecified GSS failure.  Minor code may provide more information
No Kerberos credentials available

debug1: Unspecified GSS failure.  Minor code may provide more information

debug1: Unspecified GSS failure.  Minor code may provide more information
No Kerberos credentials available

debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/mohammedrafi/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /home/mohammedrafi/.ssh/id_dsa
debug1: Trying private key: /home/mohammedrafi/.ssh/id_ecdsa
debug1: Trying private key: /home/mohammedrafi/.ssh/id_ed25519
debug1: Next authentication method: password
root@192.169.170.133’s password:
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
root@192.169.170.133’s password:

mohammedrafi@NOC-RAFI:~$ ssh  rafi@192.169.170.133
rafi@192.169.170.133’s password:
Last login: Fri Apr 15 03:44:36 2016 from 111.93.18.22

[rafi@openstack ~]$ cat /etc/ssh/sshd_config | grep -i root
PermitRootLogin no
# the setting of “PermitRootLogin without-password”.

[rafi@openstack ~]$ sudo -i

Edit no to yes
[root@openstack ~]# vim /etc/ssh/sshd_config

[root@openstack ~]# cat /etc/ssh/sshd_config | grep -i root
PermitRootLogin yes
# the setting of “PermitRootLogin without-password”.
#ChrootDirectory none

mohammedrafi@NOC-RAFI:~$ ssh root@192.169.170.133
root@192.169.170.133’s password:
Permission denied, please try again.

[root@openstack ~]# service sshd restart
Redirecting to /bin/systemctl restart  sshd.service

mohammedrafi@NOC-RAFI:~$ ssh root@192.169.170.133
root@192.169.170.133’s password:
[root@openstack ~]# 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s