Strovent SystemsSign in
Reference

SSH error messages

What common OpenSSH and SFTP error messages mean and how to fix each one.

SSH error messages, what each one meansWhat common SSH error messages mean, grouped by when they appear, before connect, the host key check, authentication, and after login or a drop.Read the SSH warning "REMOTE HOST IDENTIFICATION HAS CHANGED"Line by line, what OpenSSH prints when a host key changes, what the "Offending key" line points to, and how to remove an old key safely.SSH "no matching key exchange method" and "no matching host key type" errorsWhat "no matching key exchange method" and "no matching host key type" mean, how to read the "Their offer" list, and what to do about an old server.SSH "Too many authentication failures"Why an SSH server ends the login with "Too many authentication failures", how MaxAuthTries counts attempts, and how IdentitiesOnly fixes it.SSH banner exchange errors, "Connection closed" and "timed out during banner exchange"Why SSH fails before login with "kex_exchange_identification: Connection closed", "timed out during banner exchange" or an invalid identification string.SSH "client_loop: send disconnect: Broken pipe"What "client_loop: send disconnect: Broken pipe" means, how it differs from "Timeout, server not responding", and how to keep sessions alive.Connection abort, reset and timed-out errors in SSH and Telnet clientsWhat "Software caused connection abort", "Connection reset by peer", "timed out" and "refused" mean in SSH and Telnet clients, and what to check.SSH "PTY allocation request failed on channel 0"What the PTY allocation message means, why a host refuses a terminal, and how the -t, -T and RequestTTY options change the result.Locale warning after SSH login, "setlocale: LC_ALL: cannot change locale"Why a shell warns that it cannot change the locale right after an SSH login, how the client's locale variables reach the host, and three ways to fix it.SSH agent not available after sudo or suWhy ssh-add and git say they cannot reach your agent after sudo or su on the host, what SSH_AUTH_SOCK has to do with it, and the options for each case.SSH "This account is currently not available" (nologin shell)SSH logs in, prints This account is currently not available, then closes. The account's login shell is nologin. How to check it, change it, or use ssh -N.SSH Load key "invalid format" and "error in libcrypto"Load key "file": invalid format means ssh could not read the private key file: a .pub or .ppk file, lost line breaks, Windows line endings or no final newline.SSH "WARNING: UNPROTECTED PRIVATE KEY FILE!" and bad permissionsssh ignores a private key that other users can read and prints UNPROTECTED PRIVATE KEY FILE and Load key bad permissions. chmod 600 on the key fixes it.SSH "sign_and_send_pubkey: no mutual signature supported"sign_and_send_pubkey: no mutual signature supported means an old SSH server only checks SHA-1 ssh-rsa signatures. Use Ed25519 or allow ssh-rsa for that host.ssh "Could not resolve hostname": Name or service not knownssh: Could not resolve hostname means the name never became an IP address, so nothing was sent. Check spelling, the full domain, VPN DNS and host:port typos.Host key verification failed through a jump host (ProxyJump)With ProxyJump, your own computer checks the host keys of both the jump host and the target, in your known_hosts. Find which host failed, then fix that entry.SSH agent forwarding not working: Could not open a connection to your authentication agentWhy ssh -A or ForwardAgent gives no keys on the remote host: agent empty, forwarding refused by sshd, SSH_AUTH_SOCK overwritten, or socket not created.SSH "Corrupted MAC on input" and "message authentication code incorrect"Corrupted MAC on input means an SSH packet failed its integrity check, either from a buggy MAC algorithm on one side or from data damaged in transit.SSH "Bad owner or permissions on ~/.ssh/config": what it checks and how to fix itssh stops with Bad owner or permissions when ~/.ssh/config belongs to another user or is group or world writable. chmod 600 and chown to yourself fix it.SSH "server gave bad signature for RSA key 0" (client_global_hostkeys_private_confirm)server gave bad signature for RSA key 0 is a harmless UpdateHostKeys warning from an old server. Your login worked; UpdateHostKeys no for that host hides it.sshd log "Received disconnect from ... 11: Bye Bye [preauth]": what it meansIn an sshd log, Received disconnect ... 11 [preauth] means a client hung up before logging in. Code 11 is a normal close; the text after it is the client's.SSH "ControlPath too long" and other connection-sharing errorsControlPath too long and too long for Unix domain socket mean the socket path is over the system limit. Use a short folder and %C. Other mux errors too.SSH "connection is not using a post-quantum key exchange algorithm"OpenSSH 10.1 and later print this when the server offers no post-quantum key exchange. The login still works. Upgrade the server or silence it per host.SSH "Bad configuration option" in ~/.ssh/config or sshd_configssh stops with "line N: Bad configuration option" when it does not know a keyword: a typo, a newer or macOS-only option, a server option, or a stray key.SSH "agent refused operation": signing failed and could not add identityThe agent was reached but said no, and it never says why. Usual causes: a key added with -c and no askpass, an untouched FIDO key, a locked agent, or gpg-agent.ssh-add "Could not open a connection to your authentication agent": start the agentssh-add finds the agent only through SSH_AUTH_SOCK. The error means it is not set in this shell. Start one with eval "$(ssh-agent -s)", then run ssh-add.PuTTY "No supported authentication methods available (server sent: publickey)"PuTTY tried every login method the server allows and has none left. "server sent: publickey" means a password will never work: load your key and retry.PuTTY "Server refused our key": why and how to fix itPuTTY offered your public key and the server said no before any passphrase prompt. Usual causes: key not in authorized_keys, file modes, wrong user, ssh-rsa.SSH "remote port forwarding failed for listen port": why ssh -R is refusedThe server would not listen on the port you asked for with ssh -R: an old session still holds it, forwarding is turned off, or the port is below 1024.ssh-keygen "Key enrollment failed" for ed25519-sk: feature not supported, device not foundssh-keygen -t ed25519-sk could not create the key on your security key. The last words of the message say why. Most often, the key lacks Ed25519: use ecdsa-sk.SSH "channel 3: open failed: connect failed: Connection refused" with port forwardingThe tunnel is up, but the SSH server could not reach the target host and port in ssh -L or -D. That host name is looked up on the server, not on your side.ssh -v hangs at "expecting SSH2_MSG_KEX_ECDH_REPLY" or after "Connection established"Where ssh -v stops tells you what is stuck. After "Connection established" the server banner never came; at KEX_ECDH_REPLY large packets are being lost.SSH "Permission denied, please try again." with the right passwordssh asks for the password again, then fails: the password is wrong for that user, root may not use passwords, or the server refuses the login. Read sshd's log.sudo "a terminal is required to read the password" when running a command over SSHssh host sudo command runs without a terminal, so sudo cannot ask for the password. Add ssh -t, or set up a sudoers rule or askpass for scripts.SSH "X11 forwarding request failed on channel 0" and "cannot open display" with ssh -XThe host refused X11 forwarding: X11Forwarding is off, xauth is missing, or no display port was free. ssh -v shows which. No local DISPLAY, no request.ssh-copy-id "ERROR: No identities found" and "All keys were skipped"ssh-copy-id found no key: your agent is empty and there is no ~/.ssh/id*.pub. Create a key, or name the file with -i. All keys were skipped means already there.ssh exits with status 255: an SSH error, not your remote commandssh returns the remote command's exit status, or 255 when ssh itself failed: no connection, refused login, bad host key or a killed command. Read stderr.SSH "Connection closed by UNKNOWN port 65535": the ProxyJump or ProxyCommand failedUNKNOWN port 65535 means ssh was talking through a jump host or ProxyCommand, not a direct socket, and that link closed. The real error is on the lines above.Windows OpenSSH server asks for a password for an admin user: administrators_authorized_keysOn Windows, sshd reads keys for Administrators members from C:\ProgramData\ssh\administrators_authorized_keys, not the profile .ssh folder. Set its ACL.

Other categories