The format I should write the command to SSH into Linux VPS

sshterminalunix

I am trying to use SSH and log in from the terminal into a Linux VPS.

I have tried a few variations around the following:

ssh [user]@[hostname].[my.ip.address.xx]:22

and keep getting:

ssh: Could not resolve hostname [hostname].[ip address]:[port]: nodename nor servname provided, or not known

I have verified that my VPS works fine logging in from Windows with Putty, so I am sure I have something mixed up.

What is the format I should write this SSH command in?

Best Answer

Use a hostname, or IP address. Not both.

The hostname will only work if there is a resolvable DNS entry.
The IP address should always work as long as you use a publicly routed or otherwise reachable one.
You don't have to specify port 22, it is the assumed default when otherwise unspecified.