1

I'm using a Raspberry Pi 4B over SSH (without a desktop). For the past week, every time I try to log in, it closes the connection. I haven't changed any settings. After I enter the key and password, it logs in normally and then closes the connection.


The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Jan 30 14:35:12 2021
Connection to ***** closed.

The Log says:

OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug1: Reading configuration data C:\\Users\\*****/.ssh/config
debug1: Connecting to ***** [192.168.178.108] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\*****/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\*****/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\*****/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\*****/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\*****/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\*****/.ssh/id_ecdsa-cert type -1
key_load_public: invalid format
debug1: identity file C:\\Users\\*****/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\*****/.ssh/id_ed25519-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\*****/.ssh/id_xmss type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\*****/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Raspbian-10+deb10u2
debug1: match: OpenSSH_7.9p1 Raspbian-10+deb10u2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to *****:22 as 'pi'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ***** SHA256:*****
debug1: Host '*****' is known and matches the ECDSA host key.
debug1: Found key in C:\\Users\\*****/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: ***** C:\\Users\\*****/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: C:\\Users\\*****/.ssh/id_dsa
debug1: Trying private key: C:\\Users\\*****/.ssh/id_ecdsa
debug1: Trying private key: C:\\Users\\*****/.ssh/id_ed25519
debug1: read_passphrase: can't open /dev/tty: No such file or directory
Enter passphrase for key 'C:\Users\*****/.ssh/id_ed25519':
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: C:\\Users\\*****/.ssh/id_xmss
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such file or directory
pi@*****'s password:
debug1: Authentication succeeded (password).
Authenticated to ***** ([***.***.***.***]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: console supports the ansi parsing
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
Linux ***** 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb  2 18:36:12 2021 from 192.168.178.125
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to ***** closed.
Transferred: sent 2640, received 2800 bytes, in 0.6 seconds
Bytes per second: sent 4487.6, received 4759.5
debug1: Exit status 132

I replaced everything private, with *****

Because im using the Os Version without Desktop, only one Folder (Overlay) is on the sd card. i havent found anything with ssh, but there is a file called "issue.txt".

Raspberry Pi reference 2020-08-20
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 9a3a10bf1019ebb2d59053564dc6b90068bad27d, stage2

Is there any way to copy the files from the Raspberry Os Version without Desktop?

6
  • Did you add something to the .bashrc or .profile of your user or /etc/bashrc /etc/profile that exits the shell. An exit command for example? Or do you source a script with an exit command or, do you perform reboot or shutdown -r in one of these files? Have you installed or updated software that might have changed these files? I think the hardware is ok. Have you a second SD card to boot with a different installation? Just to double check it works again with a fresh installation. If you have configured a second user, try to login with it's username. Jan 31 at 14:13
  • do you have a firewall? can you post some log output?
    – brad
    Feb 1 at 8:50
  • @PeterPaulKiefer I added, the command to start my program on bootup (which still starts), but I added it like a month ago.
    – Crafty06
    Feb 1 at 11:36
  • @brad I'm not using a firewall, and how can I get the log?
    – Crafty06
    Feb 1 at 11:37
  • Maybe you find some hints when you connect with the debug flag, e.g. ssh -v ....
    – Ingo
    Feb 2 at 10:01
2

Hm... there are only 4 debug1 lines after "Last login...". Don't know what they mean. Maybe google help you? I have seen an immediate logout after login due to a malfunction on the ssh server if its filesystem is full or set to read only. Can you verify this?

You can also improve the log level on the ssh server. Because you can't ssh to it I think you have to use a card reader on a computer to modify the SD Card of the ssh server. In /etc/ssh/sshd_config set

LogLevel DEBUG3

Then after a try to login inspect the logs. Look at How to inspect systemd journal files directly?, or have a look at /var/log/syslog if available.

1
  • There´s only one Folder on the Sd Card. It´s called "Overlay" and if i search for "ssh", nothing comes up
    – Crafty06
    Feb 3 at 14:04
1

Exit status 132 means the process was terminated by SIGILL:

SIGILL: illegal instruction, binary probably corrupt

Check your SD card for errors, if that doesn't help reinstall the system, if it's still broken get a new SD card.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.