A. linux伺服器用戶設置了publickey免密碼遠程ssh登錄之後
不用重新設置的,public key 和伺服器的密碼是無關的。
B. linux伺服器怎麼設置免密登錄
這要看你通過什麼方式登錄了,有些就不需要密碼就能登錄例如黑客程序等,一般都需要密碼認證比較安全一點,自己程序也可以,自己開埠,就不需要密碼登錄了
C. 伺服器不允許匿名登錄,怎麼訪問webservices
控制面板裡面有個管理工具,再選擇計算機管理,再點本地用戶和組 再點用戶,再把GUEST屬性里的帳號已停用前面的勾去掉!
D. 電腦伺服器不能登陸拒絕訪問了,我該怎麼辦
安全模式卸載瑞星開機按F8-修復計算機-命令提示符(或從光碟啟動-修復計算機-命令提示符)輸入: 1 reg load "hklmoffline software" c:windowssystem32configsoftware 2 鍵入regedit打開注冊表依次 HKEY_LOCAL_MACHINEoffline SOFTWAREMicrosoftWindows NTCurrentVersionProfileList下在s-1-5-21打頭的項中根據ProfileImagePath找不能登錄的用戶名,記下其sid,通常是2個 s-1-5-21-......1000和s-1-5-21-....1000.bak,保留s-1-5-21-....1000.bak刪除s-1-5-21-......1000 3 卸載配置單元 reg unload "hklmoffline software" 重啟計算機,即可正常登錄。
E. linux下怎樣設置ssh無密碼登錄
第1步:在本地主機中生成「密鑰對」並將公鑰傳送到遠程伺服器中:
[root@linuxprobe ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):直接敲擊回車或設置密鑰的存儲路徑
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase): 直接敲擊回車或設置密鑰的密碼
Enter same passphrase again: 再次敲擊回車或設置密鑰的密碼
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
40:32:48:18:e4:ac:c0:c3:c1:ba:7c:6c:3a:a8:b5:22 [email protected]
The key's randomart image is:
+--[ RSA 2048]----+
|+*..o . |
|*.o + |
|o* . |
|+ . . |
|o.. S |
|.. + |
|. = |
|E+ . |
|+.o |
+-----------------+
第2步:將生成好的私鑰文件傳送至遠程主機:
[root@linuxprobe ~]# ssh--id 192.168.10.20
The authenticity of host '192.168.10.20 (192.168.10.20)' can't be established.
ECDSA key fingerprint is 4f:a7:91:9e:8d:6f:b9:48:02:32:61:95:48:ed:1e:3f.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh--id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh--id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
[email protected]'s password:此處輸入遠程伺服器主機密碼
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '192.168.10.20'"
and check to make sure that only the key(s) you wanted were added.
第3步:設置伺服器主機只允許密鑰驗證,拒絕傳統口令驗證方式,記得修改配置文件後保存並重啟sshd服務程序哦~:
[root@linuxprobe ~]# vim /etc/ssh/sshd_config
………………省略部分輸出信息………………
74
75 # To disable tunneled clear text passwords, change to no here!
76 #PasswordAuthentication yes
77 #PermitEmptyPasswords no
78 PasswordAuthentication no
79
………………省略部分輸出信息………………
[root@linuxprobe ~]# systemctl restart sshd
第4步:在客戶端主機嘗試登陸到服務端主機,此時無需輸入密碼口令也可直接驗證登陸成功:
[root@linuxprobe ~]# ssh 192.168.10.20
Last login: Mon Apr 13 19:
F. 伺服器間怎麼實現無密碼登錄.列舉操作步驟
天互數據 杜超為您解答
你好,下做法在solaris 10,redhat as 5.0上測試通過。
提示:如果沒有。ssh目錄可用ssh命令遠程登錄一下任意機器再退出即可,或者手工創建一個:mkdir .ssh;chmod 755 .ssh
注意,如果按下列步驟完成後,ssh依然需要輸入密碼,那麼請設置。ssh目錄許可權為755,authorized_keys*的許可權為600
hosta和hostb都必須同步完成以下操作,以hosta為例
================================================================
1、創建密鑰對
[root@hosta /]# who am i
root pts/1 2008-04-30 12:08 (172.16.10.220)
[root@hosta /]# cd ~/.ssh
[root@hosta .ssh]# ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
0a:13:25:19:a2:59:2c:b1:49:e6:62:90:57:07:e5:f7 root@hosta
passphrase(密鑰保護) 保留為空,否則使用ssh時將要求輸入passphrase(密鑰保護)
2、發布公鑰和獲取公鑰
[root@hosta .ssh]# scp id_dsa.pub hostb:/root/.ssh/hosta.key.pub
root@hostb's password:
id_dsa.pub 100% 600 0.6KB/s 00:00
[root@hosta .ssh]# scp hostb:/root/.ssh/id_dsa.pub /root/.ssh/hostb.key.pub
root@hostb's password:
id_dsa.pub 100% 600 0.6KB/s 00:00
3、對公鑰授權
[root@hosta .ssh]# cat id_dsa.pub 》authorized_keys2
[root@hosta .ssh]# cat hostb.key.pub 》authorized_keys2
如果是ssh v1版本,比如solaris 9,就使用authorized_keys文件
4、使用密鑰對登錄
[root@hosta .ssh]# ssh hostb
Last login: Sun Apr 27 00:04:49 2008 from 172.16.10.220
[root@hostb ~]# exit
logout
Connection to hostb closed.
5、查看日誌
[root@hosta .ssh]# more /var/log/secure
Apr 27 10:26:47 hosta sshd[9309]: Accepted password for root from 172.16.10.220 port 239
5 ssh2
Apr 27 10:26:47 hosta sshd[9309]: pam_unix(sshd:session): session opened for user root b
y (uid=0)
Apr 27 10:41:51 hosta sshd[12195]: Accepted password for root from 172.16.10.220 port 24
08 ssh2
Apr 27 10:41:51 hosta sshd[12195]: pam_unix(sshd:session): session opened for user root
by (uid=0)
Apr 27 12:42:15 hosta sshd[3331]: pam_unix(sshd:session): session closed for user root
Apr 27 13:08:32 hosta sshd[26563]: Accepted password for root from 172.16.10.2 port 4324
7 ssh2
Apr 27 13:08:32 hosta sshd[26563]: pam_unix(sshd:session): session opened for user root
by (uid=0)
Apr 27 13:08:33 hosta sshd[26563]: pam_unix(sshd:session): session closed for user root
Apr 27 13:08:52 hosta sshd[26607]: Accepted password for root from 172.16.10.2 port 4324
8 ssh2
Apr 27 13:08:52 hosta sshd[26607]: pam_unix(sshd:session): session opened for user root
by (uid=0)
Apr 27 13:08:52 hosta sshd[26607]: pam_unix(sshd:session): session closed for user root
Apr 27 13:09:15 hosta sshd[26658]: Accepted password for root from 172.16.10.2 port 4324
9 ssh2
Apr 27 13:09:15 hosta sshd[26658]: pam_unix(sshd:session): session opened for user root
by (uid=0)
Apr 27 13:09:15 hosta sshd[26658]: pam_unix(sshd:session): session closed for user root
Apr 27 13:09:25 hosta sshd[26689]: Accepted password for root from 172.16.10.2 port 4325
0 ssh2
Apr 27 13:09:25 hosta sshd[26689]: pam_unix(sshd:session): session opened for user root
by (uid=0)
Apr 27 13:09:25 hosta sshd[26689]: pam_unix(sshd:session): session closed for user root
Apr 27 13:51:27 hosta sshd[29770]: Accepted password for root from 172.16.10.220 port 4248 ssh2
Apr 27 13:51:27 hosta sshd[29770]: pam_unix(sshd:session): session opened for user root by (uid=0)
Apr 27 13:53:54 hosta sshd[29770]: pam_unix(sshd:session): session closed for user root
Apr 27 15:13:48 hosta sshd[9309]: pam_unix(sshd:session): session closed for user root
Apr 27 15:22:20 hosta sshd[12195]: pam_unix(sshd:session): session closed for user root
Apr 27 23:37:48 hosta sshd[7798]: Accepted password for root from 172.16.10.220 port 4948 ssh2
Apr 27 23:37:48 hosta sshd[7798]: pam_unix(sshd:session): session opened for user root by (uid=0)
Apr 28 04:30:58 hosta sshd[7798]: pam_unix(sshd:session): session closed for user root
Apr 30 12:08:32 hosta sshd[15039]: Accepted password for root from 172.16.10.220 port 1637 ssh2
Apr 30 12:08:32 hosta sshd[15039]: pam_unix(sshd:session): session opened for user root by (uid=0)
Apr 30 12:11:05 hosta useradd[15282]: new group: name=mysql, GID=503
Apr 30 12:11:05 hosta useradd[15282]: new user: name=mysql, UID=503, GID=503, home=/home/mysql, shell=/bin/bash
Apr 30 12:22:18 hosta sshd[16164]: Accepted password for root from 172.16.10.2 port 47224 ssh2
Apr 30 12:22:18 hosta sshd[16164]: pam_unix(sshd:session): session opened for user root by (uid=0)
Apr 30 12:22:18 hosta sshd[16164]: pam_unix(sshd:session): session closed for user root
6、查看ssh的詳細操作記錄(ssh -v, scp -v or sftp -v …)
[root@hosta .ssh]# scp -v /root/install.log hostb:/root
Executing: program /usr/bin/ssh host hostb, user (unspecified), command scp -v -t /root
OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to hostb [172.16.10.2] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'hostb' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Offering public key: /root/.ssh/id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 433
debug1: read PEM private key done: type DSA
debug1: Authentication succeeded (publickey)。
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = zh_CN.GB18030
debug1: Sending command: scp -v -t /root
Sending file modes: C0644 35582 install.log
Sink: C0644 35582 install.log
install.log 100% 35KB 34.8KB/s 00:00
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.2 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0
G. public key變了,怎麼登錄從伺服器
Linux#public key登陸問題
場景
jekins部署出現permission問題
計算機生成了可選文字:[twrkspace] $ / bin/ sh —xe /emp/hudson624B311B77195180436.sh channel stopped deploy_1ise-'10.20.O.17 10.20. 0.22' . war for ip in $deploy_lise' scp / Permission denied, please try again. Permission denied, please try again. Permission denied (publickey , password) . lose connection Build seep 'Execute shell' marked build as failure
原因
ssh伺服器的key方式登錄對許可權要求嚴格。對於客戶端:私鑰必須為600許可權或者更嚴格許可權(400),一旦其他用戶可讀,私鑰就不起作用(如640),表現為系統認為不存在私鑰。
對於伺服器端:要求必須公鑰其他用戶不可寫,一旦其他用戶可寫(如660),就無法用key登錄,表現為:Permissiondenied(publickey)。
同時要求.ssh目錄其他用戶不可寫,一旦其他用戶可寫(如770),就無法使用key登錄,表現為:Permissiondenied(publickey)。
不僅.ssh目錄,更上層的目錄的許可權同樣會有影響。
home中用戶目錄的可寫,表示其他用戶對.ssh子目錄也有改寫的許可權(刪除或重命令),也就導致ssh判斷.ssh為其他用戶可寫,拒絕使用key登錄。
確認Linux系統是32位還是64位
解決
1.uname-a
2.uname-m
3.file/sbin/init
4.file/bin/ls
5.arch
6.getconfLONG_BIT
7.getconfWORD_BIT
圖示
H. UKeY登錄時顯示伺服器連接失敗,無法登錄驗證,怎辦
這個會不會是網速的問題,或者騰訊伺服器的問題,再不行就卸載重新安裝
I. linux 伺服器如何去除免密碼登錄
你是要讓伺服器使用密碼登錄呢
要讓其使用密碼登錄,,修改/etc/sshd/有一個叫sshd_config的文件類似修改其配置
還是要讓其之間不使用密碼登錄呢?
不使用密碼 ssh基於密鑰通信,,你網路一下嘻嘻