Permissão negada para root @ localhost [duplicado]

0

Instalei o ssh no meu laptop executando o Ubuntu 14.04 LTS

quando eu abro o terminal e digito "ssh localhost" parece funcionar bem, recebo o aviso exibido e o último log in time. como abaixo

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

Mas quando eu logar como root no terminal digitando "sudo su" e então executando "ssh localhost" ele está me pedindo senha de root e eu digitei a senha correta várias vezes e recebo a mensagem dizendo permissão negada.

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).

Alterei a senha por "sudo passwd root". mesmo depois disso recebo a mesma mensagem dizendo permissão negada. Eu não sei onde a senha de root e root @ localhost são iguais e eu não sei onde eu configurei root @ localhost password. Gostaria muito de receber alguma ajuda. Obrigado.

    
por Srimanth 24.01.2015 / 17:33

1 resposta

1

pergunta similar aqui permissão negada para root @ localhost para conexão ssh

resposta foi

Por padrão, o servidor SSH nega login baseado em senha para root. Em /etc/ssh/sshd_config , altere:

PermitRootLogin without-password

para

PermitRootLogin yes

E reinicie o SSH:

sudo service ssh restart
    
por Avenyet 24.01.2015 / 18:00