0

I installed ssh on my laptop running Ubuntu 14.04 LTS

when I open terminal and type "ssh localhost" it seems to work fine, I get the notice displayed and the last log in time. like below

srimanth@srimanth-Inspiron-N5110:~$ ssh localhost
***************************************************************************
                            NOTICE TO USERS


This computer system is the private property of its owner, whether individual, corporate or government.  It is for authorized use only. Users (authorized or unauthorized) have no explicit or implicit expectation of privacy.

Any or all uses of this system and all files on this system may be intercepted, monitored, recorded, copied, audited, inspected, and disclosed to your employer, to authorized site, government, and law enforcement personnel, as well as authorized officials of government agencies, both domestic and foreign.

By using this system, the user consents to such interception, monitoring, recording, copying, auditing, inspection, and disclosure at the discretion of such personnel or officials.  Unauthorized or improper use of this system may result in civil and criminal penalties and administrative or disciplinary action, as appropriate. By continuing to use this system you indicate your awareness of and consent to these terms and conditions of use. LOG OFF IMMEDIATELY if you do not agree to the conditions stated in this warning.

**************************************************************************** Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic i686)

 * Documentation:  https://help.ubuntu.com/

Last login: Sat Jan 24 21:43:06 2015 from localhost

But when I log in as a root in terminal by typing "sudo su" and then running "ssh localhost" it is asking me for root password and I typed the correct password several times and I get the message saying permission denied.

srimanth@srimanth-Inspiron-N5110:~$ sudo su
[sudo] password for srimanth: 
xdpyinfo:  unable to open display "localhost:0.0".
root@srimanth-Inspiron-N5110/home/srimanth # ssh localhost
***************************************************************************
                            NOTICE TO USERS


This computer system is the private property of its owner, whether
individual, corporate or government.  It is for authorized use only.
Users (authorized or unauthorized) have no explicit or implicit
expectation of privacy.

Any or all uses of this system and all files on this system may be
intercepted, monitored, recorded, copied, audited, inspected, and
disclosed to your employer, to authorized site, government, and law
enforcement personnel, as well as authorized officials of government
agencies, both domestic and foreign.

By using this system, the user consents to such interception, monitoring,
recording, copying, auditing, inspection, and disclosure at the
discretion of such personnel or officials.  Unauthorized or improper use
of this system may result in civil and criminal penalties and
administrative or disciplinary action, as appropriate. By continuing to
use this system you indicate your awareness of and consent to these terms
and conditions of use. LOG OFF IMMEDIATELY if you do not agree to the
conditions stated in this warning.

****************************************************************************
root@localhost's password: 
Permission denied, please try again.
root@localhost's password: 
Permission denied, please try again.
root@localhost's password: 
Permission denied (publickey,password).

I changed password by "sudo passwd root". even after this I get the same message saying permission denied. I dont know where wether the root password and root@localhost are same and I dont know where I have set up root@localhost password. I would appreciate some help. Thank you.

Srimanth
  • 101
  • 1
  • 4

1 Answers1

1

similar question here permission denied for root@localhost for ssh connection

answer was

By default, the SSH server denies password-based login for root. In /etc/ssh/sshd_config, change:

PermitRootLogin without-password

to

PermitRootLogin yes

And restart SSH:

sudo service ssh restart
Avenyet
  • 864
  • 1
  • 7
  • 14