我希望不使用密码从 到 连接 SSH machine1
。machine2
正在machine2
使用 Solaris 10。我在machine1
使用用户上生成密钥对user1
,并将公钥传输到machine2
下user2
。(不是user1
)。
user1
然后我将公钥的内容复制到user2
ssh 目录中名为 的文件中authorized_keys
。
然后我确保我的machine2
sshd_config
具有以下内容:
IgnoreRhosts no
HostbasedAuthentication yes
PasswordAuthentication no
....
PAMAuthenticationViaKBDInt yes
RSAAuthentication yes
PermitRootLogin no
但重新启动sshd
( svcadm restart ssh
) 后,我无法user2
使用user1
at进行连接machine1
。它总是提示我输入密码。我认为 ssh 守护进程转到了该PAMAuthenticationViaKBDInt
选项。
known_hosts
我有时会看到像和这样的文件identity
。Solaris 10 版本的 SSH 是否支持它们?
machine1's
ssh_config
有人能告诉我我是否正确完成了配置吗?文件上需要做什么?
更新:我的user1
ssh -vvv
输出:
debug: server offers auth methods 'gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,hostbased'.
debug: Ssh2AuthHostBasedClient/authc-hostbased.c:595/ssh_client_auth_hostbased: Starting hostbased auth...
debug: SshConfig/sshconfig.c:3072/ssh2_parse_config_ext: Metaconfig parsing stopped at line 3.
debug: SshConfig/sshconfig.c:3364/ssh_config_read_file_ext: Read 6 params from config file.
debug: Host key pair is not specified, trying to use default 'hostkey'.
debug: SshHostKeyIO/sshhostkeyio.c:194/ssh_host_key_read_keys: Reading public host key from /etc/ssh2/hostkey .pub
debug: SshHostKeyIO/sshhostkeyio.c:279/ssh_host_key_read_keys: Host key algorithms (from disk): ssh-dss
debug: SshSigChld/sigchld.c:238/ssh_sigchld_register: Registering handler for pid 4410.
debug: Ssh2AuthHostBasedClient/authc-hostbased.c:133/hostbased_init_pubkey: Trying "hostbased" authentication with `ssh-dss' key.
debug: Ssh2AuthHostBasedClient/authc-hostbased.c:805/ssh_client_auth_hostkeys_initialized: Child: Execing ssh -signer...(path: /path/to/ssh2/bin/ssh-signer2)
debug: Ssh2AuthHostBasedClient/authc-hostbased.c:448/auth_hostbased_received_packet: ssh-signer returned SSH_ AUTH_HOSTBASED_SIGNATURE
debug: server offers auth methods 'gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,hostbased'.
debug: Ssh2AuthHostBasedClient/authc-hostbased.c:667/ssh_client_auth_hostbased: Server rejected the signature .
debug: Ssh2AuthClient/sshauthc.c:319/ssh_authc_completion_proc: Method 'hostbased' disabled.
debug: Ssh2AuthHostBasedClient/authc-hostbased.c:110/hostbased_init_pubkey: No more keys to try.
debug: ssh_pipe_stream_destroy
debug: server offers auth methods 'gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,hostbased'.
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:1794/ssh_client_auth_pubkey: Starting pubkey auth...
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:1751/ssh_client_auth_pubkey_agent_open_complete: Agent is not runn ing.
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:1549/ssh_client_auth_pubkey_agent_list_complete: Got 0 keys from t he agent.
debug: SshConfig/sshconfig.c:2979/ssh2_parse_config_ext: Unable to open /users/home/user1/.ssh2/identificatio n
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:1529/ssh_client_auth_pubkey_add_candidates: Trying 0 key candidate s.
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:983/ssh_client_auth_pubkey_try_this_candidate: All keys declined b y server, disabling method.
debug: Ssh2AuthClient/sshauthc.c:319/ssh_authc_completion_proc: Method 'publickey' disabled.
debug: server offers auth methods 'gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,hostbased'.
debug: Ssh2AuthKbdInteractiveClient/authc-kbd-interactive.c:342/ssh_client_auth_kbd_interact: Starting kbd-in t auth...
Keyboard-interactive:
Password: debug: SshReadPass/readpass.c:198/ssh_read_passphrase: got errno 4, system error Interrupted system call
谢谢