LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-30-2004, 06:51 AM   #1
dicou
Member
 
Registered: Apr 2004
Location: Paris
Posts: 44

Rep: Reputation: 15
How to open the port 22 (ssh)?


hi,
i've a question,
how can i open the port 22?
i'm a newbie, so can you explain very slowly please...
where can i do the iptables commands?
i know i have to do that : iptable -I INPUT -i eth0 -p tcp --dport 22 -j ACCEPT,
but i dont know how can i do it.
So plizz help.
I have a router modem and no firewall.
thx ;-)
 
Old 04-30-2004, 07:55 AM   #2
dominant
Member
 
Registered: Jan 2004
Posts: 409

Rep: Reputation: 30
Give #iptable -I INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
 
Old 04-30-2004, 11:40 AM   #3
Hexa
LQ Newbie
 
Registered: Apr 2004
Posts: 5

Rep: Reputation: 0
if your system is secured with iptables, and you are using a DROP policy:

iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
iptables -A OUTPUT -i eth0 -p tcp --sport 22 -j ACCEPT
 
Old 04-30-2004, 09:00 PM   #4
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Quote:
I have a router modem and no firewall.
If the firewall on your router is not active, than you will have to open port 22 (sshd) using the above mentioned command.
But first take a look at your iptables rules. It may already be open.

To do that, open a terminal window (console... command line).
To create, modify or remove rules, you have to be root.
Type the following command and enter the root password:
Code:
su -
To view your iptables rules, type:
Code:
iptables -vL
 
Old 05-02-2004, 01:37 PM   #5
dicou
Member
 
Registered: Apr 2004
Location: Paris
Posts: 44

Original Poster
Rep: Reputation: 15
are you sure the command is 'iptables'?
because i have this :

root>iptable -vL
iptable: Command not found.


root>iptables -vL
iptables: Command not found.

so i don't understand....

thx ;-)
 
Old 05-02-2004, 02:12 PM   #6
Hexa
LQ Newbie
 
Registered: Apr 2004
Posts: 5

Rep: Reputation: 0
Maybe you don't have it installed. Or maybe you are using ipchains.
Which distro do you use?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Port 22 SSH open! figfighter Linux - Security 3 07-01-2005 09:14 AM
cannot SFTP to SUSE 9.2 box, port 22 open, can putty in though using same port. jgrady Linux - Networking 6 03-29-2005 09:44 AM
how am I supposed to setup my router on my linux, so that i can open ssh 22 port? babyboss Linux - Networking 9 09-23-2004 08:33 AM
Open port ssh with modem router dicou Linux - Newbie 12 05-23-2004 04:08 PM
SSH port 22, how open it? dicou Linux - Newbie 3 04-27-2004 05:42 PM


All times are GMT -5. The time now is 08:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration