技術(shù)文檔
Ubuntu系統(tǒng)root用戶遠(yuǎn)程登錄
通過CRT遠(yuǎn)程登錄Ubuntu時(shí)遇到報(bào)錯(cuò):
The client has disconnected from the server. Reason:
Unable to authenticate using any of the configured authentication methods.
Ubuntu初始登錄只能是普通用戶,想用root登錄,需普通用戶登錄,然后切換為root用戶,先設(shè)置root密碼,再更改sshd_config文件
ixo@snort:~$ sudo su
Password:
root@snort:/home/ixo#sudo passwd root
New password:
Retype new password:
passwd: password updated successfully
root@snort:/home/ivo# nano /etc/ssh/sshd_config
注意:是sshd_config,而不是ssh_config
...
#port 22
port 22
#PermitRootLogin prohibit-password
PermitRootLogin yes # 允許root直接登錄
保存后重啟ssh服務(wù)
sudo service ssh restart
標(biāo)簽: