Sunday 16 September 2018

macos - OSX: ssh: Could not resolve hostname: nodename nor servname provided, or not known


There are two mac hosts in my Wi-Fi network (laptop and Desktop) I'm trying to ssh laptop from Desktop - everything works fine When I'm trying to ssh from laptop to Desktop doing this:


ssh macpro.local

I get this:


ssh: Could not resolve hostname: nodename nor servname provided, or not known

defining usrename@macpro.local or root@macpro.local makes no difference


But when I do this:


ssh 192.168.1.67

it works.


As I said I have no problem doing all this on my desktop. Also when I do this (on both computers)


/usr/sbin/sshd -t

I get this:


Could not load host key: /etc/ssh_host_rsa_key
Could not load host key: /etc/ssh_host_dsa_key

Please help!



Answer



Fixed adding to /etc/hosts:


192.168.1.67 macpro.local

For some reason ~/.ssh/config is not enough


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...