I'm trying to SSH another machine on my LAN using the hostname because the local IP address gets re-assigned somewhat regularly (we have issues with our ISP and frequently have to reset our network).
I have a laptop with the login freedom@flex15
and currently local IP 192.168.1.11
and I have a desktop I am trying to connect to for file transfer with the login freedom@barton
and local IP 192.168.1.153
I think I just need some formatting clarification on how to connect using hostname. All the guides I read say to use something like:
ssh://username@hostname
but if I try:
ssh://freedom@barton
I get this error:
Oops! Something went wrong.
Unable to find the requested location. Please check the spelling or the network settings.
However, when using:
ssh://[email protected]
It works fine. So I'm not sure what I'm doing wrong here because all the documentation says I can use ssh://hostname or ssh://username@hostname or something like that. It would be ideal to have some way to specific this machine that does not involve the IP address. Thank you.
"192.168.1.153" is a private ip address on a LAN.
So, on the server (192.168.1.153) set a static ip address if you have not already.
On the client, edit /etc/hosts
and add a line at the bottom -
You should then be able to run ssh://freedom@barton