access a server and its port via ssh

ssh user@ip:port

port is the port number that the SSH server is using (by default, port 22).

Let’s say you want to access an SSH server with IP 192.168.0.7 and port 22, and your username is axel. The command would be:

ssh axel@192.168.0.7:22

If the port is the default (22), there is no need to specify it. Therefore, the command would be:

ssh axel@192.168.0.7

Once you have run the command, you will be prompted to enter the password of the user you are using to access the server.