Score:0

Issue while SSHing DigitalOcean Droplet

br flag

I am facing a problem while trying to SSH a DO droplet. It is running 4 Python scripts fetching data via API and storing in MySQL(running on same Droplet). It had no issue when I was running 2 Python script but I started facing issue of SSH when I ran 4. Intially it gave the error:

'shell request failed on channel 0

and I was unable to login. When I enabled the verbose mode after sending -v switch it took a while and then logged in with the following info:

OpenSSH_8.1p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug1: Connecting to 291.234.230.166 [291.234.230.166] port 22.
debug1: Connection established.
debug1: identity file dokey type 0
debug1: identity file dokey-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_9.0p1 Ubuntu-1ubuntu7
debug1: match: OpenSSH_9.0p1 Ubuntu-1ubuntu7 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 291.234.230.166:22 as 'root'
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: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:lznBqzR8ZwxO68S3OLtGe9CaVe/RwXDyhlHpYRL31ro
debug1: Host '291.234.230.166' is known and matches the ECDSA host key.
debug1: Found key in /Users/x/.ssh/known_hosts:125
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: dokey RSA SHA256:xKO5RRccCVxxx+iIlF6lnN0 explicit
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected]>
debug1: kex_input_ext_info: [email protected] (unrecognised)
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: dokey RSA SHA256:xKO5RRccCVxxx+iIlF6lnN0 explicit
debug1: Server accepts key: dokey RSA SHA256:xKO5RRccCVxxx+iIlF6lnN0 explicit
debug1: Authentication succeeded (publickey).
Authenticated to 291.234.230.166 ([291.234.230.166]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: Remote: /root/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Remote: /root/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_ALL = en_US.UTF-8
debug1: Sending env LC_CTYPE = UTF-8
Welcome to Ubuntu 22.10 (GNU/Linux 5.19.0-28-generic x86_64)

I am unable to understand why is it happening

pt flag
This doesn't look like an ssh problem -- that `Welcome to Ubuntu 22.10` at the end means that you were able to log in successfully.
Volatil3 avatar
br flag
@larsks then what could it be? right now i am unable to login. Which logs should I check? To clarify, the server is up, everything is running
pt flag
Can you log in on the console instead of using ssh?
Volatil3 avatar
br flag
@larsks No. It shows black screen after the *Connected* message.
Volatil3 avatar
br flag
@larsks can you pls help? I also have downloaded `syslogs` but getting now idea what to check there.
pt flag
If you are unable to log in via ssh and you are unable to log in on the console you don't seem to have any method of ingress that would permit you to perform further diagnostics. Have you tried simply rebooting the host?
Volatil3 avatar
br flag
@larsks Yes I always reboot but donot know what to check now. BTW, I had 4 `screen` sessions active running Python script 24x7
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.