Ubuntu – SSH Connection refused

sshUbuntu

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.

Best Answer

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...

Related Question