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基于密钥通信,,你网络一下嘻嘻