Using Hostnames with ssh
So I finally got around to setting my machines up so that they can ssh into each other. UFW is enabled, and a rule allowing ssh has been added. I edited sshd_config to prevent root login. At least I feel like I have some level of security now. (I don't really know that the firewall is doing anything, though, since the only port my machine is listening to is 22, and UFW is set to allow ssh on that port, but I digress...)
To the point: The basic syntax for ssh is:
Now I can get this to work if I enter the target machine's local IP address. It works, but that seems a sub-optimal approach. Right now I don't have my router set up to bind IP and MAC addresses. Even if I do that, I don't know that I want to have to recall the machine address each time I ssh. I would have thought I could make it work with something like this:
but when I issue that command, nothing happens. The terminal just sits there like it's looking for something. (I guess it's unsuccessfully trying to find the target machine.) Am I missing something?
Side point: Once I've established the ssh connection, my command prompt doesn't change. I expected it to somehow reflect the ssh login, but instead it still shows the name of the machine I'm sitting at. Again, am I missing something?
Either I wasn't seeing straight and this was actually doing what I expected it to, or the behavior changed after I rebooted the target machine.
Last edited by newb85; October 24th, 2013 at 04:17 PM.
Jane, stop this crazy thing!