与远程服务器建立 ssh 连接时出现问题

与远程服务器建立 ssh 连接时出现问题

当我使用此命令 ssh someserver 时出现以下错误

Could not chdir to home directory /var/ak/home/username: No such file or directory
aksh: fatal error: user account has been deleted

aksh-wrapper: FATAL: The appliance shell failed unexpectedly with error code 1.

我的主目录位于home_staff/username以下地址,该地址与错误消息中的主目录不同,但我不知道如何修复它。

使用-v选项我得到了以下日志

Your Kerberos account/password will expire in 7073 days.


Last login: Wed May  2 07:22:32 2018 from 10.2.162.142
Could not chdir to home directory /var/ak/home/username: No such file or directory
aksh: fatal error: user account has been deleted

aksh-wrapper: FATAL: The appliance shell failed unexpectedly with error code 1.
Connection to someserver closed.
[username@opres-lx6 ~]$ ssh -v  someserver
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to someserver [***.***.*.***] port 22.
debug1: Connection established.
debug1: identity file /home/username/.ssh/identity type -1
debug1: identity file /home/username/.ssh/identity-cert type -1
debug1: identity file /home/username/.ssh/id_rsa type -1
debug1: identity file /home/username/.ssh/id_rsa-cert type -1
debug1: identity file /home/username/.ssh/id_dsa type -1
debug1: identity file /home/username/.ssh/id_dsa-cert type -1
debug1: identity file /home/username/.ssh/id_ecdsa type -1
debug1: identity file /home/username/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version Sun_SSH_2.4
debug1: no match: Sun_SSH_2.4
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1 none
debug1: kex: client->server aes128-ctr hmac-sha1 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<2048<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 'someserver' is known and matches the RSA host key.
debug1: Found key in /home/username/.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: gssapi-keyex,gssapi-with-mic,publickey,password,keyboard-interactive
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure.  Minor code may provide more information
Credentials cache file '/tmp/krb5cc_1423091' not found

debug1: Unspecified GSS failure.  Minor code may provide more information
Credentials cache file '/tmp/krb5cc_1423091' not found

debug1: Next authentication method: publickey
debug1: Trying private key: /home/username/.ssh/identity
debug1: Trying private key: /home/username/.ssh/id_rsa
debug1: Trying private key: /home/username/.ssh/id_dsa
debug1: Trying private key: /home/username/.ssh/id_ecdsa
debug1: Next authentication method: keyboard-interactive
Password:
Your Kerberos account/password will expire in 7073 days.


debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_AU
debug1: Remote: Missing locale support for LANG=en_AU
Last login: Thu May  3 12:55:27 2018 from 10.2.244.35
Could not chdir to home directory /var/ak/home/username: No such file or directory
aksh: fatal error: user account has been deleted

aksh-wrapper: FATAL: The appliance shell failed unexpectedly with error code 1.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to someserver closed.
Transferred: sent 2120, received 3048 bytes, in 0.3 seconds
Bytes per second: sent 7537.7, received 10837.3
debug1: Exit status 1

答案1

答案在日志中清楚地显示:

Could not chdir to home directory /var/ak/home/username: No such file or directory
aksh: fatal error: user account has been deleted
aksh-wrapper: FATAL: The appliance shell failed unexpectedly with error code 1.

我认为您需要与系统管理员讨论该问题:您的帐户似乎已被删除,因为虽然身份验证已通过(可能有故障),但用户的主目录已不存在。

当前系统配置导致“帐户终止”状态并导致随后的登录失败。

PS 你正在运行两边的非常旧的软件!升级不会“使固定“但是,您的问题可以在不久的将来帮助解决安全和其他类似问题。

相关内容