全新安装系统后,默认情况下将禁用Debian Linux上的root登录。当您尝试以root用户身份登录Debian Jessie Linux服务器时,访问将被拒绝,例如:
$ ssh This email address is being protected from spambots. You need JavaScript enabled to view it.
document.getElementById('cloakd2c7892dcb7466389e8d6328ba9f5f14').innerHTML='';var prefix='ma'+'il'+'to';var path='hr'+'ef'+'=';var addyd2c7892dcb7466389e8d6328ba9f5f14='root'+'@';addyd2c7892dcb7466389e8d6328ba9f5f14=addyd2c7892dcb7466389e8d6328ba9f5f14+'10'+'.'+'1'+'.'+'1'+'.'+'12';var addy_textd2c7892dcb7466389e8d6328ba9f5f14='root'+'@'+'10'+'.'+'1'+'.'+'1'+'.'+'12';document.getElementById('cloakd2c7892dcb7466389e8d6328ba9f5f14').innerHTML+=''+addy_textd2c7892dcb7466389e8d6328ba9f5f14+'';
This email address is being protected from spambots. You need JavaScript enabled to view it.document.getElementById('cloakeb1ffaf2a1214e381a75354e924d1605').innerHTML='';var prefix='ma'+'il'+'to';var path='hr'+'ef'+'=';var addyeb1ffaf2a1214e381a75354e924d1605='root'+'@';addyeb1ffaf2a1214e381a75354e924d1605=addyeb1ffaf2a1214e381a75354e924d1605+'10'+'.'+'1'+'.'+'1'+'.'+'12';var addy_texteb1ffaf2a1214e381a75354e924d1605='root'+'@'+'10'+'.'+'1'+'.'+'1'+'.'+'12';document.getElementById('cloakeb1ffaf2a1214e381a75354e924d1605').innerHTML+=''+addy_texteb1ffaf2a1214e381a75354e924d1605+'';'s password:
Permission denied, please try again.
This email address is being protected from spambots. You need JavaScript enabled to view it.document.getElementById('cloak7c425127c44bbcea5362e4d56194df76').innerHTML='';var prefix='ma'+'il'+'to';var path='hr'+'ef'+'=';var addy7c425127c44bbcea5362e4d56194df76='root'+'@';addy7c425127c44bbcea5362e4d56194df76=addy7c425127c44bbcea5362e4d56194df76+'10'+'.'+'1'+'.'+'1'+'.'+'12';var addy_text7c425127c44bbcea5362e4d56194df76='root'+'@'+'10'+'.'+'1'+'.'+'1'+'.'+'12';document.getElementById('cloak7c425127c44bbcea5362e4d56194df76').innerHTML+=''+addy_text7c425127c44bbcea5362e4d56194df76+'';'s password:
Permission denied, please try again.
This email address is being protected from spambots. You need JavaScript enabled to view it.document.getElementById('cloak6dc56a535cf09379c4264da93accfcd8').innerHTML='';var prefix='ma'+'il'+'to';var path='hr'+'ef'+'=';var addy6dc56a535cf09379c4264da93accfcd8='root'+'@';addy6dc56a535cf09379c4264da93accfcd8=addy6dc56a535cf09379c4264da93accfcd8+'10'+'.'+'1'+'.'+'1'+'.'+'12';var addy_text6dc56a535cf09379c4264da93accfcd8='root'+'@'+'10'+'.'+'1'+'.'+'1'+'.'+'12';document.getElementById('cloak6dc56a535cf09379c4264da93accfcd8').innerHTML+=''+addy_text6dc56a535cf09379c4264da93accfcd8+'';'s password:
Permission denied (publickey,password).
要在Debian Linux系统上为root用户启用SSH登录,您需要首先配置SSH服务器。打开/etc/ssh/sshd_config
并更改以下行:
FROM:
PermitRootLogin without-password
TO:
PermitRootLogin yes
完成上述更改后,请重新启动SSH服务器:
# /etc/init.d/ssh restart
[ ok ] Restarting ssh (via systemctl): ssh.service.
从现在开始,您将能够以root用户身份使用ssh登录:
$ ssh This email address is being protected from spambots. You need JavaScript enabled to view it.document.getElementById('cloak859e0a0823e51568c859a6892c313829').innerHTML='';var prefix='ma'+'il'+'to';var path='hr'+'ef'+'=';var addy859e0a0823e51568c859a6892c313829='root'+'@';addy859e0a0823e51568c859a6892c313829=addy859e0a0823e51568c859a6892c313829+'10'+'.'+'1'+'.'+'1'+'.'+'12';var addy_text859e0a0823e51568c859a6892c313829='root'+'@'+'10'+'.'+'1'+'.'+'1'+'.'+'12';document.getElementById('cloak859e0a0823e51568c859a6892c313829').innerHTML+=''+addy_text859e0a0823e51568c859a6892c313829+'';
This email address is being protected from spambots. You need JavaScript enabled to view it.document.getElementById('cloak56d7851f4e954398bca8df2b78c6d1ce').innerHTML='';var prefix='ma'+'il'+'to';var path='hr'+'ef'+'=';var addy56d7851f4e954398bca8df2b78c6d1ce='root'+'@';addy56d7851f4e954398bca8df2b78c6d1ce=addy56d7851f4e954398bca8df2b78c6d1ce+'10'+'.'+'1'+'.'+'1'+'.'+'12';var addy_text56d7851f4e954398bca8df2b78c6d1ce='root'+'@'+'10'+'.'+'1'+'.'+'1'+'.'+'12';document.getElementById('cloak56d7851f4e954398bca8df2b78c6d1ce').innerHTML+=''+addy_text56d7851f4e954398bca8df2b78c6d1ce+'';'s password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
以下指南将为您提供有关如何在Ubuntu 16.04 Xenial Xerus Linux Server /Desktop上启用SSH根登录。