I'm trying to connect to Ubuntu via SSH from OS X, and I took the same step as explained in this page (https://help.ubuntu.com/10.04/serverguide/openssh-server.html). After setting it, I tried to connect by the form of username@ip_address
, then it was successful and I was able to be in Ubuntu from OS X Terminal (this time I used port 22). However, when I tried to SSH to Ubuntu by the form of username@hostname
, then I couldn't and the error ssh: Could not resolve hostname my_user_name: nodename nor servname provided, or not known
occurred. I also tried to connect via port 2222 by changing /etc/ssh/sshd_config
, then it failed too by spitting out the error debug1: connect to address my_ip_address port 22: Connection refused
(this time I tried to connect by IP address).
So I think the latter issue stems from the fact that I have to make some sort of modifications also on OS X, but don't know where/how to do and don't know it's true in the first place.
The former issue is more annoying, as I'm not sure whether I could understand it correctly. I used hostname
as the value that I got from running hostname
on Ubuntu Terminal...but is it right? And when I searched for the issue on the Web, I knew that it's from DNS issue...but don't know what it is and how to fix it...
Thanks.