今天安裝了Ubuntu?Server 14.04 ? 在終端配置了root密碼后,使用SecureCRT和putty竟然不能ssh登陸,SecureCRT一直提示密碼不對,但是可以肯定輸入的密碼100%正確,用putty則一直報Access?Denied,所以可以肯定系統限制了root不允許遠程ssh登陸。
但是普通用戶遠程ssh登錄后su root正常! ?why?
原來sshd_config里面有了限制
#vim /etc/ssh/sshd_config
1 2 3 4 5 | ? #?Authentication: ?LoginGraceTime?120? #PermitRootLogin?without-password????#找到這里,把它注釋 ?PermitRootLogin? yes ??????????????????#改為yes??然后重啟<a href="http://so.21ops.com/cse/search?s=9181936462520079739&entry=1&q=ssh" class="bdcs-inlinelink" target="_blank">ssh</a> ? StrictModes? yes ??? |
#service ssh restart??
#Tips:這里注意/etc/init.d/ssh restart 用這個方式重啟是不成功的。