Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a mini2440 board that has linux on it. I want to connect to it with a SSH connection from my vmware-ubuntu 11.10. I can ping it. But we I want to connect to it with this command

ssh root@192.168.1.230

I get this error:

Connection refused

I searched the Internet. Someone said: "Install openssh-server". and I installed it. Someone said :"Check if sshd is running " and I checked it. Someone said :"Open port 22 on windows firewall. and I opened it for inbound rules and outbound rules. I need this connection to debug my programs remotely with Eclipse.

But :( But non of them were useful. and I still get this error. Would you please help me? I'm confused.

share|improve this question
    
What do you get from ssh -v root@192.168.1.230? –  ott-- Dec 15 '11 at 17:37
    
OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to 192.168.1.230 [192.168.1.230] port 22. debug1: connect to address 192.168.1.230 port 22: Connection refused ssh: connect to host 192.168.1.230 port 22: Connection refused This is my output –  saeed Dec 16 '11 at 7:40

3 Answers 3

Seems that iptables isn't allowing connections on port 22, you should try stop iptables and try to connect again.

You can create a rule on iptables to allow connections on port 22 in this way :

iptables -A INPUT -i ethX -p tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o ethX -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT

Where ethX is your network interface device, substitute it with : eth0, eth1 ... Depending on your needs...

share|improve this answer

If it says connection refused then it means the port is open.. otherwise how will SSH Client know the connection was refused?!So that means your Open-SSH is actively blocking ALL incomming connection on the mini2400.

If the port was closed it would say connection could not be established. Ping will not determine if SSH will work, because ping produces an echo on the interface layer that has very little to do with the software side. (eg Ping has no port number, but needs to have an IP assigned to Echo back)

But to be sure you can try to Telnet into port 22 and see what the terminal says- If you get some feedback then the port it open.. yay! Otherwise connection timed out. Booo

So you need to change the config to allow local ip ranges to connect. it think sometimes it is commented in the conf file on some distros- Did you check that and make sure the setting are what you need on the MINI machine?

share|improve this answer
1  
Connection refused means there is noone listening to that port (sshd not running) or a firewall is blocking it. –  ott-- Dec 15 '11 at 17:36
    
@ppumkin ~> Thanks! Yeah ! telnet got the same error :(. I opened tcp port 22 for incoming and outgoing connections. But nothing changed. My mini2440 also was checked by someone else with his laptop and his fedora box and connection was created. Would you please explain your last paragraph a little ? –  saeed Dec 15 '11 at 23:23
    
Perhaps it could be helpful that I say I couldn't connect to this port with puTTy on windows. The same error :( –  saeed Dec 15 '11 at 23:25
    
so another machine can connect but not your? Then make sure any firewalls on your machine are turned off. –  ppumkin Dec 16 '11 at 8:48

Check if you can login (with PuTTY) to the server from your Windows 7. If yes, it means you should work on your VMWare settings (or the relation between your Windows and VMWare).
Also check with another user account. May be SSH access to 'root' is disabled.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.