Cant ssh into Centos7 virtualbox after changing run level
I was making some changes to the run level in a Centos7 VM in Virtualbox, I changed it to run level 0 but then changed it back to 3 and restarted but I am now unable to ssh into it remotely.
I have verified that the runlevel is back at 3 and rebooted several times now and still cant ssh in with any user, it just time out every time. thanks |
Have you tried adding the -v option to your ssh attempts???
Try -vvv for more output! EDIT: That's three (3) lower case V's |
Just check the VM to see if the networking and ssh processes are running.
|
this is the -vvv output
$ ssh root@192.168.1.52 -vvv OpenSSH_7.5p1, OpenSSL 1.0.2l 25 May 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug2: resolving "192.168.1.52" port 22 debug2: ssh_connect_direct: needpriv 0 debug1: Connecting to 192.168.1.52 [192.168.1.52] port 22. debug1: connect to address 192.168.1.52 port 22: Connection timed out ssh: connect to host 192.168.1.52 port 22: Connection timed out I will check VM settings now |
How is the VM network adapter configured?
Are you using the correct IP address? The firewall default allows ssh traffic so if it was running you should be able to connect. Just as an FYI run levels in systemd are "obselete". An equivalent is: 0 = poweroff.target 1 = rescue.target 2,3,4 = multiuser.target 5 = graphical.target 6 = reboot.target |
Quote:
|
Running the command init 0 should of powered off the VM. No settings were changed.
You can check ssh status via the command. systemctl status sshd You can also verify ssh is working within the VM by trying to login to itself. ssh localhost |
My guess is that sshd is not running. Probably it was set up and started, but not "enabled," so it doesn't start at boot.
Clue is "Connection Timed Out" -- means there's no daemon listening on port 22. Just a guess, tho. What does Code:
ss -tnl |
Quote:
Solved, thank you! |
All times are GMT -5. The time now is 08:27 PM. |