Enabling remote ssh access


I am working on a Linux network that was set-up by someone else and I need help enabling remote SSH access.

Here's what I've done so far, but to no avail.

iptables -A INPUT -p udp --sport 22 -j ACCEPT

and I've added the following to the hosts.allow file:


Reply to
Dr. Oz
Loading thread data ...

Shouldn't that be:

iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT

Note -------+ (not ssh_config) V /etc/ssh/sshd_config add these lines :

PermitRootLogin no AllowUsers troy

If you don't have strong passwords, you should look at public key auth too.

Reply to
Troy Piggins

Also Take care abut outgoing packets from our machine since tcp is a two way protocol. Esle if default policy of output chain is to drop, then connection won't respond

Reply to

I think the -m tcp it's not needed. And he also have to use the RELATED and ESTABLISHED rules for the outgoing traffic. Something like: iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT


Reply to
Jose Maria Lopez Hernandez

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.