r/linuxadmin • • Jul 28 '26

I've bought VPS server and can't ssh to it.

Edit: the issiue is solved by changing ip of the VPS.

Ty everyone for help.

______

Hi. I've bought VPS. But can't really connect to it remotely. Here the situation:

  1. ssh root@[SERVER_IP] does work from Google Console ( http://shell.could.google.com/ ) (the VPS is not from google).
  2. ssh root@[SERVER_IP] doesn't work from 5 local devices (win10, win11, macOS, 2xAndroid):

    $ ssh root@[SERVER_IP] -vvv OpenSSH_7.9p1, LibreSSL 2.7.3 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying options for * debug2: resolve_canonicalize: hostname [SERVER_IP] is address debug2: ssh_connect_direct debug1: Connecting to [SERVER_IP] [[SERVER_IP]] port 22. debug1: Connection established. debug1: identity file /Users/[USER_NAME]/.ssh/id_rsa type -1 debug1: identity file /Users/[USER_NAME]/.ssh/id_rsa-cert type -1 debug1: identity file /Users/[USER_NAME]/.ssh/id_dsa type -1 debug1: identity file /Users/[USER_NAME]/.ssh/id_dsa-cert type -1 debug1: identity file /Users/[USER_NAME]/.ssh/id_ecdsa type -1 debug1: identity file /Users/[USER_NAME]/.ssh/id_ecdsa-cert type -1 debug1: identity file /Users/[USER_NAME]/.ssh/id_ed25519 type -1 debug1: identity file /Users/[USER_NAME]/.ssh/id_ed25519-cert type -1 debug1: identity file /Users/[USER_NAME]/.ssh/id_xmss type -1 debug1: identity file /Users/[USER_NAME]/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_7.9 ssh_exchange_identification: read: Operation timed out

  3. I don't see my local IP in sudo tail -f /var/log/auth.log and journalctl -u ssh (i might be looking wrong though).

  4. I tried Wi-Fi and two different mobile internet providers.

  5. I tried to ssh while VPN on.

  6. I added my IP to white list on the server: sudo iptables -I INPUT 1 -p tcp -s [LOCAL_IP] --dport 22 -j ACCEPT

Where can be the problem?

Edits:

OS + iptables conf

sudo systemctl status firewalld says that there is no firewalld

.

.

i stoped fail2ban and tried to ssh - didn't help.
disabling it and rebooting the server leads to connection refusal (i.e. problem on an earlier stage).

0 Upvotes

53 comments sorted by

View all comments

Show parent comment

3

u/mad_redhatter Jul 28 '26

Right. How does that web page connect to the VPS though? Hint: through a serial connection. Disable all the serial ttys on your VPS and that console will fail to function.