Jump to content

[Solved] Can't access VPS through SSH after port change.


Recommended Posts

Posted

I changed the SSH port from 22 to 6287 or 6143 or 6003. I tried in all these ports but unable to reach the system.

Would a restart of the OS on VM suffice? I have set the port in SSHD config. Your kind help needed.

Krydos san, every attempt by me to configure the VPS is eventually troubling you.

Posted

Either there’s a confing issue, or possibly the new port is blocked in your own firewall (it happens…)

Escalating to Krydos…

  • Thanks 1
Posted

I reset the password on your abisheak account back to the default password it started with, logged in, and ran the command

sudo ufw allow 8143/tcp

I also deleted the old firewall rules for port 22 since they are no longer in use. Can you login to ssh now?

  • Krydos changed the title to [Solved] Can't access VPS through SSH after port change.
Posted

If you change the port of ssh, leave the original ssh without logging out and try in a new ssh window with the changed port.
Never log out of the original ssh until you are sure you can log in to the new ssh port.

  • Like 1
Posted

Excellent advise that I always do as well because I've made that same mistake and learned the hard way. If you right click the putty title bar you can select duplicate session to make a new ssh connection to the same server quickly and easily. If the second putty window doesn't connect you know you have a problem, and if you close the first window you will lose all access.

  • Thanks 1
Posted
7 hours ago, balloons said:

If you change the port of ssh, leave the original ssh without logging out and try in a new ssh window with the changed port.
Never log out of the original ssh until you are sure you can log in to the new ssh port.

Nice foolproof idea. Thanks a lot, @balloons san.

12 hours ago, Krydos said:

I reset the password on your abisheak account back to the default password it started with, logged in, and ran the command

sudo ufw allow 8143/tcp

I also deleted the old firewall rules for port 22 since they are no longer in use. Can you login to ssh now?

Thanks once again Krydos san

  • Krydos locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...