wannabecraig
asked on
How do I opem SSH access on a newly built SUSE 11 linux box?
Hi, as title says, I need SSH (port22) access to my new linux server but I'm not sure how to open the port.
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
ASKER
I've keyed that in but it is still not accepting connections on port22.
ASKER
p.s. I'm trying to putty to it.
Did you start the sshd service?
check to see if its running:
ps -ef | grep ssh
In redhat you can start it like so:
/etc/init.d/sshd start
or
service sshd start
If it does not start automatically at boot you can start it on boot with the following command:
chkconfig sshd on
check to see if its running:
ps -ef | grep ssh
In redhat you can start it like so:
/etc/init.d/sshd start
or
service sshd start
If it does not start automatically at boot you can start it on boot with the following command:
chkconfig sshd on
Do you have any firewall before the remote server?
In red hat,you can do:
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
and
service iptables save
to make the change permanent.Then to make sure it works, you restart the firewall with:
service iptables restart
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
and
service iptables save
to make the change permanent.Then to make sure it works, you restart the firewall with:
service iptables restart
ASKER
I have started the sshd service, not change.
When I use the service iptables save command it get the following error:
no such service iptables.
When I use the service iptables save command it get the following error:
no such service iptables.
Try:
iptables-save
But before you do that, check /etc/sysconfig/iptables-co nfig (or wherever Suse keeps iptables and its config file) to make sure that on a save, the changes are recorded.
Once that's done:
iptables -n --list to verify the order and accuracy of your rules.
iptables-save
But before you do that, check /etc/sysconfig/iptables-co
Once that's done:
iptables -n --list to verify the order and accuracy of your rules.
ASKER
Still not working.
I notice when I turn the firewall off (phase 1 & 2) then I can get SSH and VNC access. So it's defo something to do with open ports on that machine.
Any other ideas? Is there any way I can see a list of open ports?
I notice when I turn the firewall off (phase 1 & 2) then I can get SSH and VNC access. So it's defo something to do with open ports on that machine.
Any other ideas? Is there any way I can see a list of open ports?
ASKER
Ok, the rule is in there but the drop rule is above it.
How can I move the allow rule up?
DROP all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
How can I move the allow rule up?
DROP all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dont forget to save it... :)
ASKER
Thanks, I added the inbuilt OS gui firewall tool and did it that way.
Thanks anyway.
Thanks anyway.