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

SSH not working

*I am using a random ip address and username for this*


So I am trying to use ssh on my mac. I go onto terminal and type


ssh DavidSmith@86.138.124.283


which is the write login details as I have checked however it waits for like 20 seconds then says


ssh: connect to host 86.138.124.283 port 22: Operation timed out


so I am not really sure what to do as it is not work.

Someone Please Help Me?!?!

MacBook Air, OS X Yosemite (10.10.2), Mid 2011

Posted on Apr 21, 2015 11:17 AM

Reply
3 replies

Apr 21, 2015 11:55 AM in response to BenjiNaylor

Do you have System Preferences -> Sharing -> Remote Login enabled on the destination Mac?


If "Yes", then do you have a system where ssh DOES work? If so, then try 2 ssh diagnostic commands:


ssh -v -v -v DavidSmith@86.138.124.283


ssh -v -v -v username@system.where.ssh.works


Now compare the output from each ssh command, and see where the failing ssh command goes bad. The debugging messages in and around the failure should give you a clue about what is going wrong.


On the destination Mac (86.138.124.283) you can also look in the logs 'sshd' messages. Applications -> Utilities -> Console -> system.log (search for 'sshd')

Apr 21, 2015 3:14 PM in response to BenjiNaylor

There are numerous reasons why the connection may fail.


First - and most obvious - is whether the remote host is actually running and reachable.


Problems here could be related to the IP address being wrong, or a firewall or some other device that's blocking access.

Can you ping the remote IP address? If ping fails then all other bets are likely off.


Assuming the host is up and you're not firewalled, the next question is whether the host is running an SSH server. If it's a Mac, check System Preferences -> Sharing -> Remote Login. Other OSes have different methods of enabling SSH.


Those are the most likely scenarios, and should cover almost all cases. Once you check those you can narrow down the solution.

SSH not working

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