Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ssh connection refused from mac os x on connecting to a remote computer

Tags:

I am running on Mac OS X 10.7.4.
I am unable to ssh to a remote computer, but when I do ssh user@localhost, it works fine.

The error displayed is

 OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011 debug1: Reading configuration data /etc/ssh_config debug1: Applying options for * debug1: Connecting to web.iiit.ac.in [14.139.82.8] port 22. debug1: connect to address 14.139.82.8 port 22: Connection refused ssh: connect to host web.iiit.ac.in port 22: Connection refused 

I have enabled the root login in System Preferences and disabled firewall.

Also, ps aux | grep ssh shows ssh-agent, contains /usr/bin/ssh-agent -l and grep ssh in the output.

On doing sudo launchctl list|grep ssh it shows:

  • 0 com.openssh.sshd

After this, sudo launchctl start com.openssh.sshd ; sudo launchctl list|grep ssh gives 45973 - com.openssh.sshd

Again, after checking sudo launchctl list|grep ssh after sometime, it again shows : - 0 com.openssh.sshd

like image 915
user1516993 Avatar asked Jul 11 '12 07:07

user1516993


People also ask

Why is my SSH connection refused in Mac?

Credentials are Wrong. Typos or incorrect credentials are common reasons for a refused SSH connection. Make sure you are not mistyping the username or password. Then, check whether you are using the correct IP address of the server.


2 Answers

In system preferences -> sharing->enable remote login. It will fix it.

like image 52
Neeraj Harikrishnan Avatar answered Nov 23 '22 08:11

Neeraj Harikrishnan


Wireless connections has well know problems with the SSH strict package receiving algorithm. I have the same problem with a WiMax connection. It would turn good if you can establish a VPN or any kind of tunnel to the server.

see also

this thread

like image 29
LorenzoDaPonte Avatar answered Nov 23 '22 09:11

LorenzoDaPonte