Enabling remote ssh access

Mar 28, 2005 3 Replies

Hi,



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:



ALL:ALL sshd:ALL


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.

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

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

Regards.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required