我想从机器“ub0”ssh到另一台机器“ub1”没有使用密码。 我在“ub0”上使用nfs设置,但仍要求input密码。
这是我的情况:
下面我的.ssh文件夹的内容
authorized_keys中 id_dsa的 id_dsa.pub 的known_hosts
所有这个调用wathever函数“ssh ub1主机名”我要求我的密码。 你知道我可以试试吗?
我也在这两行机器的ssh_config文件中注释了这一行
IdentityFile〜/ .ssh / id_dsa
我也试过了
ssh -i $ HOME / .ssh / id_dsa mpiu @ ub1
在ssh -vv下面
码: OpenSSH_5.1p1 Debian-3ubuntu1,OpenSSL 0.9.8g 2007年10月19日 OpenSSH_5.1p1 Debian-3ubuntu1,OpenSSL 0.9.8g 2007年10月19日 debug1:读取configuration数据/ etc / ssh / ssh_config debug1:应用选项* debug2:ssh_connect:needpriv 0 debug1:连接到ub1 [192.168.2.9]端口22。 debug1:build立连接。 debug2:key_type_from_name:未知键types'----- BEGIN' debug2:key_type_from_name:未知键types'----- END' debug1:身份文件/mirror/mpiu/.ssh/id_dsatypes2 debug1:检查黑名单文件/usr/share/ssh/blacklist.DSA-1024 debug1:检查黑名单文件/etc/ssh/blacklist.DSA-1024 debug1:远程协议版本2.0,远程软件版本lshd-2.0.4 lsh - 一个GNU ssh debug1:不匹配:lshd-2.0.4 lsh - 一个GNU ssh debug1:启用协议2.0的兼容模式 debug1:本地版本stringSSH-2.0-OpenSSH_5.1p1 Debian-3ubuntu1 debug2:fd 3设置O_NONBLOCK debug1:发送SSH2_MSG_KEXINIT debugging1:收到SSH2_MSG_KEXINIT debug2:kex_parse_kexinit:diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2:kex_parse_kexinit:ssh-rsa,ssh-dss debug2:kex_parse_kexinit:aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc @ lysator.liu.se,aes128-ctr,aes192- CTR,AES256-CTR debug2:kex_parse_kexinit:aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc @ lysator.liu.se,aes128-ctr,aes192- CTR,AES256-CTR debug2:kex_parse_kexinit:hmac-md5,hmac-sha1,umac-64 @ openssh.com,hmac-ripemd160,hmac-ripemd160 @ openssh.com,hmac-sha1-96,hmac-md5-96 debug2:kex_parse_kexinit:hmac-md5,hmac-sha1,umac-64 @ openssh.com,hmac-ripemd160,hmac-ripemd160 @ openssh.com,hmac-sha1-96,hmac-md5-96 debug2:kex_parse_kexinit:none,zlib @ openssh.com,zlib debug2:kex_parse_kexinit:none,zlib @ openssh.com,zlib debug2:kex_parse_kexinit: debug2:kex_parse_kexinit: debug2:kex_parse_kexinit:first_kex_follows 0 debug2:kex_parse_kexinit:保留0 debug2:kex_parse_kexinit:diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2:kex_parse_kexinit:ssh-rsa,spki-sign-rsa debug2:kex_parse_kexinit:aes256-cbc,3des-cbc,blowfish-cbc,arcfour debug2:kex_parse_kexinit:aes256-cbc,3des-cbc,blowfish-cbc,arcfour debug2:kex_parse_kexinit:hmac-sha1,hmac-md5 debug2:kex_parse_kexinit:hmac-sha1,hmac-md5 debug2:kex_parse_kexinit:none,zlib debug2:kex_parse_kexinit:none,zlib debug2:kex_parse_kexinit: debug2:kex_parse_kexinit: debug2:kex_parse_kexinit:first_kex_follows 0 debug2:kex_parse_kexinit:保留0 debug2:mac_setup:findhmac-md5 debug1:kex:server-> client 3des-cbc hmac-md5 none debug2:mac_setup:findhmac-md5 debug1:kex:client-> server 3des-cbc hmac-md5 none debug2:dh_gen_key:私钥位设置:183/384 debug2:bits设置:1028/2048 debug1:发送SSH2_MSG_KEXDH_INIT debug1:期待SSH2_MSG_KEXDH_REPLY debug1:主机'ub1'是已知的,并与RSA主机密钥匹配。 debug1:find/mirror/mpiu/.ssh/known_hosts:1中的密钥 debug2:设置的位数:1039/2048 debug1:ssh_rsa_verify:签名正确 debug2:kex_derive_keys debug2:set_newkeys:模式1 debug1:发送了SSH2_MSG_NEWKEYS debug1:期待SSH2_MSG_NEWKEYS debug2:set_newkeys:模式0 debug1:收到SSH2_MSG_NEWKEYS debugging1:发送了SSH2_MSG_SERVICE_REQUEST debug2:service_accept:ssh-userauth debug1:收到SSH2_MSG_SERVICE_ACCEPT debug2:key:/mirror/mpiu/.ssh/id_dsa(0xb874b098) debug1:可以继续的身份validation:密码,公钥 debug1:下一个validation方法:publickey debug1:提供公钥:/mirror/mpiu/.ssh/id_dsa debug2:我们发送了一个publickey包,等待回复 debug1:可以继续的身份validation:密码,公钥 debug2:我们没有发送数据包,禁用方法 debug1:下一个validation方法:密码 mpiu @ ub1的密码:
我挂在这里!
您的ssh客户端在公钥authentication之前正在尝试密码authentication。
检查您的~/.ssh/config和/etc/ssh/ssh_config文件以获取PreferredAuthentications条目。
如果将以下条目添加到我的~/.ssh/config文件中,我会看到类似的行为:
PreferredAuthentications password,publickey
如果您在上述任何一个文件中都有类似的内容,请将其注释掉。