Link to home
Start Free TrialLog in
Avatar of wannabecraig
wannabecraigFlag for Ireland

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.
Avatar of michofreiha
michofreiha
Flag of Lebanon image

iptables -A INPUT -p tcp --dport 22 -j ACCEPT
Avatar of wannabecraig

ASKER

I've keyed that in but it is still not accepting connections on port22.
p.s. I'm trying to putty to it.
Avatar of Steven Vona
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

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

   iptables-save

But before you do that, check /etc/sysconfig/iptables-config (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.
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?
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
ASKER CERTIFIED SOLUTION
Avatar of Steven Vona
Steven Vona
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dont forget to save it... :)
Thanks, I added the inbuilt OS gui firewall tool and did it that way.
Thanks anyway.