[CentOS] Problem SSH

Benjamin Smith lists at benjamindsmith.com
Tue Oct 25 17:54:16 UTC 2005


Based on your question, I'll consider that you're pretty much using a standard 
iptables config. 

edit /etc/sysconfig/iptables 

Add the following line, somewhere in the middle - it allows inbound 
connections to TCP port 22: 

-A RH-Firewall-1-INPUT -p tcp --dport 22 -j ACCEPT

If you want to restrict access to a single IP address try this,  - it allows 
inbound connections to port 22 from ip address 1.2.3.4: 

-A RH-Firewall-1-INPUT -p tcp -s 1.2.3.4/32 --dport 22 -j ACCEPT

Then restart iptables 
/etc/rc.d/init.d/iptables restart; 

Cheers! 
-Ben 


On Tuesday 25 October 2005 09:54, Mauricio Merlin wrote:
> My Centos 4.1 only accept connections from localhost, my file conf is 
> default.
> error: ssh: connect to host 192.168.1.78 port 22: No route to host
> 
> 
> thanks
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 

-- 
"The best way to predict the future is to invent it."
- XEROX PARC slogan, circa 1978



More information about the CentOS mailing list