歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> SecureCRT SSH連接一直提示密碼錯誤

SecureCRT SSH連接一直提示密碼錯誤

日期:2017/2/28 13:49:21   编辑:Linux教程

遇到在密碼正確的情況下ssh密碼不對,最後一種是我遇到的問題上面的是網上大家遇到的總結一下。我的問題是selinux沒有關閉,被改動了配置。

1、權限問題
.ssh目錄,以及/home/當前用戶 需要700權限,參考以下操作調整
sudo chmod 700 ~/.ssh
sudo chmod 700 /home/當前用戶
.ssh目錄下的authorized_keys文件需要600或644權限,參考以下操作調整
sudo chmod 600 ~/.ssh/authorized_keys

2、StrictModes問題
編輯
sudo vi /etc/ssh/sshd_config
找到
#StrictModes yes
改成
StrictModes no

3 RSAAuthentication問題/etc/ssh/sshd_config
RSAAuthentication yes
PubkeyAuthentication yes

如果還不行,可以用ssh -vvv 目標機器ip 查看詳情,根據輸出內容具體問題具體分析了

4、#getenforce 查看selinux狀態
[root@localhost ~]# getenforce ---------------查看selinux狀態
Enforcing ----------------------------------顯示正在實施運行
#setenforce 0|1 ------------------------------設置selinux關閉|開啟
[root@localhost ~]# getenforce ---------------再查看selinux狀態
Permissive------------------------------------可以關閉,但只是零時關閉
vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled --------------------------需要把原來的enforcing改成disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

SecureCRT 連接VirtualBox 中的Ubuntu -端口轉發 http://www.linuxidc.com/Linux/2015-12/126258.htm

用SecureCRT 實現 WIN7 與 Linux 雙向通信的問題及文件互傳問題解決 http://www.linuxidc.com/Linux/2014-08/105412.htm

如何使用SecureCRT6.6.2通過SSH方式登錄Ubuntu系統 http://www.linuxidc.com/Linux/2011-03/33024p4.htm

SecureCRT 連接 Ubuntu http://www.linuxidc.com/Linux/2013-06/85824.htm

Ubuntu 12.04 + 虛擬機VMware 9 + Secure CRT + EditPlus 本地C++開發環境搭建 http://www.linuxidc.com/Linux/2013-05/84820.htm

利用SecureCRT在Linux與Windows之間傳輸文件 http://www.linuxidc.com/Linux/2014-08/105413.htm

Ubuntu 14.10安裝SecureCRT 7.3 http://www.linuxidc.com/Linux/2014-10/108709.htm

SecureCRT 的詳細介紹:請點這裡
SecureCRT 的下載地址:請點這裡

Copyright © Linux教程網 All Rights Reserved