OS X 新创建的用户不能通过 SSH 登录, 怎样解决?


我是通过命令行创建的用户, 步骤按照文章里做的:
http://rickychilcott.com/2010/12/06/adding-a-user-in-mac-os-x-snow-leopard-via-command-line/
完成后设置了密码, 并通过 su username 进入过新用户的账户..

但是通过登录 SSH 登陆时, 一直提示重新输入密码, 可我输入的内容是对的.
前边的操作我都是另一个账户通过 SSH 做的, 所以远程访问已经开启, 正常 SSH 连接的.

另外有注意到, 虽然命令当中有创建用户目录的说明, 但实际上没有生成用户目录,

尝试手动创建了一个, 没啥效果..

这种情况下应该怎么办?


 ➤➤ ssh -v cyong@192.168.0.111
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /Users/chen/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
debug1: Connecting to 192.168.0.136 [192.168.0.136] port 22.
debug1: Connection established.
debug1: identity file /Users/chen/.ssh/id_rsa type -1
debug1: identity file /Users/chen/.ssh/id_rsa-cert type -1
debug1: identity file /Users/chen/.ssh/id_dsa type -1
debug1: identity file /Users/chen/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com 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: Server host key: RSA 62:4a:73:8e:cd:5d:f1:18:35:ce:68:03:a1:ff:33:24
debug1: Host '192.168.0.111' is known and matches the RSA host key.
debug1: Found key in /Users/chen/.ssh/known_hosts:14
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/chen/.ssh/id_rsa
debug1: Trying private key: /Users/chen/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).

ssh osx

李希特霍芬 11 years, 9 months ago

修改 sshd 配置
PasswordAuthentication 开启,即
PasswordAuthentication yes

OHiYo answered 11 years, 9 months ago

Your Answer