por que o ssh myLogin @ localhost funciona, mas o ssh root @ localhost não funciona? [duplicado]

1

Eu sei que o ssh root @ localhost é uma má ideia ... eu entendi.

Mas por que o ssh root@localhost não funciona?

Eu até mudei minha senha de root para o caso:

> sudo -s
> passwd

Mas ainda quando eu faço ssh root@localhost eu recebo

root@localhost's password : [insiro a senha]

Permission denied, please try again.

Eu tentei ssh -v não sei o que procurar aqui são as últimas linhas:

...
debug1: Offering RSA public key: /home/myName/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/myName/.ssh/id_dsa
debug1: Trying private key: /home/myName/.ssh/id_abcde
debug1: Trying private key: /home/myName/.ssh/id_ed123456
debug1: Next authentication method: password
root@localhost's password: 
debug1: Authentications that can continue: publickey,password                                                                                                                                     
Permission denied, please try again.                                                                                                                                                              
root@localhost's password:                                                                                                                                                                        
debug1: Authentications that can continue: publickey,password                                                                                                                                     
Permission denied, please try again.                                                                                                                                                              
root@localhost's password:                                                                                                                                                                        
debug1: Authentications that can continue: publickey,password                                                                                                                                     
debug1: No more authentication methods to try.                                                                                                                                                    
Permission denied (publickey,password). 

/ etc / ssh / sshd_config

ChallengeResponseAuthentication no
PermitRootLogin without-password
    
por hba 15.11.2015 / 19:38

1 resposta

6

O problema é esta linha:

PermitRootLogin without-password

De acordo com a página de manual do sshd_config:

PermitRootLogin
Specifies whether root can log in using ssh(1). The argument must be “yes”, “without-password”, “forced-commands-only”, or “no”. The default is “yes”.

If this option is set to “without-password”, password authentication is disabled for root.

A configuração without-password é útil principalmente para fazer login usando uma chave pública (em ~/.ssh/authorized_keys ).

    
por 15.11.2015 / 20:18

Tags