ssh:突然无法用密码login(Permission denied)

我知道在这个网站上有很多类似的问题,但是他们都没有提供一个答案让我解决了我的问题。

前提是我对ssh几乎一无所知,但是我正在使用它来从我的笔记本电脑(一台OSX 10.12.2的Macbook Pro)上运行。

我通常用命令连接到服务器(一台Linux机器)

ssh [email protected] 

然后input我的密码。 它一直运行良好,我从来没有改变密码。 问题是,突然间它开始拒绝我的访问:

 [email protected]'s password: Permission denied, please try again. 

运行

 ssh -vvv [email protected] 

给我以下输出:

 OpenSSH_7.3p1, LibreSSL 2.4.1 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 20: Applying options for * debug1: /etc/ssh/ssh_config line 102: Applying options for * debug2: resolving "example.com" port 22 debug2: ssh_connect_direct: needpriv 0 debug1: Connecting to example.com [162.38.150.124] port 22. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file /Users/Valerio/.ssh/id_rsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Valerio/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Valerio/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Valerio/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Valerio/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Valerio/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Valerio/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Valerio/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.3 debug1: Remote protocol version 2.0, remote software version OpenSSH_3.9p1 debug1: match: OpenSSH_3.9p1 pat OpenSSH_3.* compat 0x01000000 debug2: fd 3 setting O_NONBLOCK debug1: Authenticating to example.com:22 as 'valerio' debug3: hostkeys_foreach: reading file "/Users/Valerio/.ssh/known_hosts" debug3: record_hostkey: found key type RSA in file /Users/Valerio/.ssh/known_hosts:4 debug3: load_hostkeys: loaded 1 keys from example.com debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa debug3: send packet: type 20 debug1: SSH2_MSG_KEXINIT sent debug3: receive packet: type 20 debug1: SSH2_MSG_KEXINIT received debug2: local client KEXINIT proposal debug2: KEX algorithms: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c debug2: host key algorithms: [email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa,[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519 debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: compression ctos: none,[email protected],zlib debug2: compression stoc: none,[email protected],zlib debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug2: peer server KEXINIT proposal debug2: KEX algorithms: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: host key algorithms: ssh-rsa,ssh-dss debug2: ciphers ctos: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr debug2: ciphers stoc: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr debug2: MACs ctos: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: MACs stoc: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: compression ctos: none,zlib debug2: compression stoc: none,zlib debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug1: kex: algorithm: diffie-hellman-group-exchange-sha1 debug1: kex: host key algorithm: ssh-rsa debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha1 compression: none debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha1 compression: none debug3: send packet: type 34 debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(2048<7680<8192) sent debug3: receive packet: type 31 debug1: got SSH2_MSG_KEX_DH_GEX_GROUP debug2: bits set: 2055/4096 debug3: send packet: type 32 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug3: receive packet: type 33 debug1: got SSH2_MSG_KEX_DH_GEX_REPLY debug1: Server host key: ssh-rsa SHA256:9BFc7zxWndDesiubGVPV0qY7LSdlHhvhbrPc+stWsSs debug3: hostkeys_foreach: reading file "/Users/Valerio/.ssh/known_hosts" debug3: record_hostkey: found key type RSA in file /Users/Valerio/.ssh/known_hosts:4 debug3: load_hostkeys: loaded 1 keys from example.com debug3: hostkeys_foreach: reading file "/Users/Valerio/.ssh/known_hosts" debug3: record_hostkey: found key type RSA in file /Users/Valerio/.ssh/known_hosts:3 debug3: load_hostkeys: loaded 1 keys from 162.38.150.124 debug1: Host 'example.com' is known and matches the RSA host key. debug1: Found key in /Users/Valerio/.ssh/known_hosts:4 debug2: bits set: 2059/4096 debug3: send packet: type 21 debug2: set_newkeys: mode 1 debug1: rekey after 4294967296 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug3: receive packet: type 21 debug2: set_newkeys: mode 0 debug1: rekey after 4294967296 blocks debug1: SSH2_MSG_NEWKEYS received debug2: key: /Users/Valerio/.ssh/id_rsa (0x0) debug2: key: /Users/Valerio/.ssh/id_dsa (0x0) debug2: key: /Users/Valerio/.ssh/id_ecdsa (0x0) debug2: key: /Users/Valerio/.ssh/id_ed25519 (0x0) debug3: send packet: type 5 debug3: receive packet: type 6 debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug3: send packet: type 50 debug3: receive packet: type 51 debug1: Authentications that can continue: publickey,gssapi-with-mic,password debug3: start over, passed a different list publickey,gssapi-with-mic,password debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Trying private key: /Users/Valerio/.ssh/id_rsa debug3: no such identity: /Users/Valerio/.ssh/id_rsa: No such file or directory debug1: Trying private key: /Users/Valerio/.ssh/id_dsa debug3: no such identity: /Users/Valerio/.ssh/id_dsa: No such file or directory debug1: Trying private key: /Users/Valerio/.ssh/id_ecdsa debug3: no such identity: /Users/Valerio/.ssh/id_ecdsa: No such file or directory debug1: Trying private key: /Users/Valerio/.ssh/id_ed25519 debug3: no such identity: /Users/Valerio/.ssh/id_ed25519: No such file or directory debug2: we did not send a packet, disable method debug3: authmethod_lookup password debug3: remaining preferred: ,password debug3: authmethod_is_enabled password debug1: Next authentication method: password [email protected]'s password: debug3: send packet: type 50 debug2: we sent a password packet, wait for reply debug3: receive packet: type 51 debug1: Authentications that can continue: publickey,gssapi-with-mic,password Permission denied, please try again. [email protected]'s password: debug3: send packet: type 50 debug2: we sent a password packet, wait for reply debug3: receive packet: type 51 debug1: Authentications that can continue: publickey,gssapi-with-mic,password Permission denied, please try again. [email protected]'s password: debug3: send packet: type 50 debug2: we sent a password packet, wait for reply debug3: receive packet: type 51 debug1: Authentications that can continue: publickey,gssapi-with-mic,password debug2: we did not send a packet, disable method debug1: No more authentication methods to try. Permission denied (publickey,gssapi-with-mic,password). 

我的ssh_config文件如下:

 # $OpenBSD: ssh_config,v 1.26 2010/01/11 01:39:46 dtucker Exp $ # This is the ssh client system-wide configuration file. See # ssh_config(5) for more information. This file provides defaults for # users, and the values can be changed in per-user configuration files # or on the command line. # Configuration data is parsed as follows: # 1. command line options # 2. user-specific file # 3. system-wide file # Any configuration value is only changed the first time it is set. # Thus, host-specific definitions should be at the beginning of the # configuration file, and defaults at the end. # Site-wide defaults for some commonly used options. For a comprehensive # list of available options, their meanings and defaults, please see the # ssh_config(5) man page. Host * SendEnv LANG LC_* # Configuration options and default values (see ssh_config(5) for their meaning): # # Host # (no default) # AddressFamily any # AskPassGUI yes # (Apple only) # BatchMode no # BindAddress # (no default) # ChallengeResponseAuthentication yes # CheckHostIP yes # Cipher 3des # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour # ClearAllForwardings no # Compression no # CompressionLevel 6 # ConnectionAttempts 1 # ConnectTimeout # (no default) # ControlMaster no # ControlPath # (no default) # ControlPersist no # DynamicForward # EnableSSHKeysign no # EscapeChar ~ # ExitOnForwardFailure no # ForwardAgent no # ForwardX11 no # ForwardX11Timeout 1200 # ForwardX11Trusted no # XauthLocation xauth # Default is to search $PATH. It is recommended that a full path be provided. # GatewayPorts no # GlobalKnownHostsFile /etc/ssh/ssh_known_hosts,/etc/ssh/ssh_known_hosts2 # GSSAPIAuthentication no # GSSAPIDelegateCredentials no # GSSAPIKeyExchange no # GSSAPITrustDNS no # HashKnownHosts no # HostbasedAuthentication no # HostKeyAlgorithms [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss # HostKeyAlias # (no default) # HostName # (set by command at run-time) # IdentitiesOnly no # IdentityFile .ssh/id_rsa,.ssh/id_dsa # IPQoS lowdelay # KbdInteractiveAuthentication yes # KbdInteractiveDevices # (no default) # KexAlgorithms ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 # LocalCommand # (no default) # LocalForward # (no default) # LogLevel INFO # MACs hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,hmac-sha1-96,hmac-md5-96,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96 # NoHostAuthenticationForLocalhost no # NumberOfPasswordPrompts 3 # PasswordAuthentication yes # PermitLocalCommand no # PKCS11Provider # (no default) # Port 22 # PreferredAuthentications gssapi-with-mic,hostbased,publickey,keyboard-interactive,password # (set by ssh at run-time) # Protocol 2 # ProxyCommand # (no default) # PubkeyAuthentication yes # RekeyLimit 0 # RemoteForward # (no default) # RequestTTY auto # RhostsRSAAuthentication no # RSAAuthentication yes # SendEnv # (no default) # ServerAliveCountMax 3 # ServerAliveInterval 0 # StrictHostKeyChecking ask # TCPKeepAlive yes # Tunnel no # TunnelDevice any:any # UsePrivilegedPort no # User # (set by command at run-time) # UserKnownHostsFile ~/.ssh/known_hosts,~/.ssh/known_hosts2 # VerifyHostKeyDNS no # VisualHostKey no # XAuthLocationi xauth # XAuthLocation added by XQuartz (http://xquartz.macosforge.org) Host * XAuthLocation /opt/X11/bin/xauth 

此外,目前我没有直接访问服务器。 有什么我可以尝试解决这个问题?