ssh以root使用者遠端登入失敗

2022-03-06 15:13:00 字數 636 閱讀 3433

通過secure crt遠端ssh連線linux伺服器,使用root使用者直接訪問,無法登陸成功。只能以普通使用者登入,然後su root才能切換到 root賬戶。

解決方法:

1) 普通使用者登入,然後su root切換到root賬號,

2) vim /etc/ssh/sshd_config

3. 注釋掉 #permitrootlogin without-password,新增 permitrootlogin yes

# authentication:

logingracetime 120

#permitrootlogin without-password

permitrootlogin yes

strictmodes yes

4. 重啟 ssh  服務

ssh以root使用者遠端登入失敗

通過secure crt遠端ssh連線linux伺服器,使用root使用者直接訪問,無法登陸成功。只能以普通使用者登入,然後su root才能切換到 root賬戶。解決方法 1 普通使用者登入,然後su root切換到root賬號,2 vim etc ssh sshd config 3.注釋掉 pe...

ssh服務 及禁止root使用者遠端登入

關閉防火牆與selinuxsystem systemctl status firewalld.service 檢視防火牆狀態 systemctl stop firewalld.service 臨時關閉 systemctl disable firewalld 關閉開機自啟 getenforce 檢視s...

禁止管理員root使用者通過ssh遠端登入伺服器

1.嘗試連線 ssh user ip 比如ssh yao 192.168.177.140 2.確認伺服器開啟了ssh服務 如果連線不上的話 systemctl status ssh3.重啟ssh服務 systemctl restart ssh4.修改配置檔案 配置檔案位置 etc ssh sshd ...