You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

After upgrade to macOS Catalina, terminal command ssh failed

Dear Sir or Madam,


I don't have any issue over command: ssh {myusername}@{LinuxServer} before.

But yesterday I upgraded my Mac macOS Catalina, the same command return:


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


I checked some article, is it related to zsh?


Do you know how to fix the issue?


Thanks,

Alex


MacBook Pro

Posted on Jan 19, 2020 10:51 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 20, 2020 4:53 AM

"it is like this: ssh user@server"


Is this server on your local network?


Do you have an entry for this server in /etc/hosts?


If the server is called "server" and the IP address of the server is, for example, 192.168.1.37, you need to tell your mac how to find this address. This is done by adding a line to /etc/hosts. If you are unfamiliar with this I recommend that you get someone there to assist you. You'll need to edit this file with administrator privileges, add a line such as


192.168.1.37 server


(replacing the IP and server with the actual IP and server name, of course)

and restart your mac. Then try again.


7 replies
Question marked as Top-ranking reply

Jan 20, 2020 4:53 AM in response to AlexWeiTang

"it is like this: ssh user@server"


Is this server on your local network?


Do you have an entry for this server in /etc/hosts?


If the server is called "server" and the IP address of the server is, for example, 192.168.1.37, you need to tell your mac how to find this address. This is done by adding a line to /etc/hosts. If you are unfamiliar with this I recommend that you get someone there to assist you. You'll need to edit this file with administrator privileges, add a line such as


192.168.1.37 server


(replacing the IP and server with the actual IP and server name, of course)

and restart your mac. Then try again.


Jan 20, 2020 1:14 AM in response to AlexWeiTang

No, it is not related to zsh.


Without further details, I can only guess. It is probably a dns issue ir maybe you accidentally mistyped the server address. Maybe you used to have an entry for this server in /etc/hosts, and you need to recreate that.


Please tell us about the format you are using with the ssh command.


Is it like:


ssh user@server


or


ssh user@server.subdomain.domain


or something different?



After upgrade to macOS Catalina, terminal command ssh failed

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.