V
V
Vitaly2019-10-29 16:24:51
linux
Vitaly, 2019-10-29 16:24:51

Why did you lose access to the Virtual Box virtual machine via ssh?

The Debian virtual machine runs on a Debian VPS too. I didn’t log into the virtual machine for a month, I tried it today, it won’t let me through ssh:

$ ssh [email protected] -p 49222 -vvv
OpenSSH_7.9p1 Debian-10+deb10u1, OpenSSL 1.1.1d  10 Sep 2019
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "localhost" port 49222
debug2: ssh_connect_direct
debug1: Connecting to localhost [::1] port 49222.
debug1: connect to address ::1 port 49222: Connection refused
debug1: Connecting to localhost [127.0.0.1] port 49222.
debug1: Connection established.
debug1: identity file /home/vsokolov/.ssh/id_rsa type -1
debug1: identity file /home/vsokolov/.ssh/id_rsa-cert type -1
debug1: identity file /home/vsokolov/.ssh/id_dsa type -1
debug1: identity file /home/vsokolov/.ssh/id_dsa-cert type -1
debug1: identity file /home/vsokolov/.ssh/id_ecdsa type -1
debug1: identity file /home/vsokolov/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/vsokolov/.ssh/id_ed25519 type -1
debug1: identity file /home/vsokolov/.ssh/id_ed25519-cert type -1
debug1: identity file /home/vsokolov/.ssh/id_xmss type -1
debug1: identity file /home/vsokolov/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u1
ssh_exchange_identification: read: Connection reset by peer

The virtual machine is working, checked
$ vboxmanage list runningvms
"Debian" {e45cad1d-7213-44bc-8a21-a0255be844bb}

Stopping the machine (vboxmanage controlvm "Debian" savestate) and restarting and also restarting the VPS server does not change anything.
$ sudo netstat -tnlp | grep :49222
tcp        0      0 0.0.0.0:49222           0.0.0.0:*               LISTEN      4245/VBoxHeadless

Help me figure out what's wrong.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2019-10-29
@q2digger

check the rights to the .ssh folder and its contents at the same time

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question