Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Sshd On Port 443, Can't get sshd on 443 on RED HAT 9
pawelgm
post Sep 4 2003, 07:38 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 4
Joined: 4-September 03
Member No.: 1,380



Hey there.

Plaese dont disregard this as a newb question I have worked on debian for 3 years and just recently switched to Red Hat. Who would think Red Hat would be harder to set up than Debian smile.gif

Anyhow I can't get sshd to listen on port 443. On debian all i had to do is add a line to the sshd conf file "Port 443" and everything worked , but that is not that case here. Do any of U long time Red Hat users know what might be preventing it from getting that port. I am not running a apache so that is not huggin that port. I had no troble assigining it a port that is higher than 1024 for example "Port 6789" worked.

Thanks for all your help!
Go to the top of the page
 
+Quote Post
chrisw
post Sep 4 2003, 08:56 AM
Post #2


RMS is my Hero
******

Group: Admin
Posts: 634
Joined: 27-September 02
From: Louisiana
Member No.: 5



edit the file /etc/ssh/sshd_config

uncomment the line in the file that reads:
#Port 22

uncomment it and replace 22 with your port number you wanna use and restart ssh

that should get it to work on the port you wanna use it on


--------------------

Chris W.
Go to the top of the page
 
+Quote Post
pawelgm
post Sep 4 2003, 09:33 AM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 4
Joined: 4-September 03
Member No.: 1,380



thanks Chris but that is the problem. Changing the sshd config file dont work. It works on other port like I posted above but not on 443. There must be something alse going on behind the scene
Go to the top of the page
 
+Quote Post
chrisw
post Sep 4 2003, 10:24 AM
Post #4


RMS is my Hero
******

Group: Admin
Posts: 634
Joined: 27-September 02
From: Louisiana
Member No.: 5



thats the same port that is use for https isnt it....
and you dont have apache running or anything....

in your /etc/services file....comment out
the lines that list port 443 and then restart your sshd server
and see what happens...


--------------------

Chris W.
Go to the top of the page
 
+Quote Post
hughesjr
post Sep 4 2003, 10:36 AM
Post #5


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



you probably have iptables configured to block all incoming traffic to all ports less than 1024 ... (that is one of the default settings).

Since you want to do port 443, you must add a line like this to your /etc/sysconfig/iptables file (it should be near the top of the file .... before any REJECT lines....

-A INPUT -p tcp -m tcp --dport 443 --syn -j ACCEPT

This will allow all IPs to connect to port 443 and will allow it to any IP or network card on the listening server... if you want to restrict the connection, there are many options ... if you only wanted a certain network to be able to connect, you could do this instead:

-A INPUT -p tcp -m tcp -s 192.168.0.0/255.255.255.0 --dport 443 --syn -j ACCEPT

would only allow PC's with the IP address in range 192.168.0.1 to 192.168.0.254 (source) to connect to port 443......

After you make the adjustment that is required to your /etc/sysconfig/iptables file, issue the command:

/etc/init.d/iptables restart

to enable the new settings and restart sshd with this command:

/etc/init.d/sshd restart

(make sure the port 443 line is in the /etc/sshd_config file...)


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
pawelgm
post Sep 4 2003, 10:45 AM
Post #6


Whats this Lie-nix Thing?
*

Group: Members
Posts: 4
Joined: 4-September 03
Member No.: 1,380



Thanks hughesjr, you might be onto something. If that indeed is that case I wonder how can I connect to port 22 that is also under 1024. Is port 22
let through by default ???
Go to the top of the page
 
+Quote Post
hughesjr
post Sep 4 2003, 11:28 AM
Post #7


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



it is if you select allow ssh during install .... if you look at the /etc/sysconfig/iptables file, you may see a similar entry for port 22 already.

you can temporarily turn off the iptables (/etc/init.d/iptables stop) and then restart sshd to check it .... there may already be something like apache already using port 443 (as chrisw said) as well.

If you can't get it to work by turning off iptables and testing, stop sshd (/etc/init.d/sshd stop) and do the command:

netstat -an | grep LISTEN

and look for something listening on port 443 .... it would look like this:

tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
pawelgm
post Sep 4 2003, 11:42 AM
Post #8


Whats this Lie-nix Thing?
*

Group: Members
Posts: 4
Joined: 4-September 03
Member No.: 1,380



hughesjr u are truly a know-it-all. After I stopped the iptables the sshd did accept connections on 443. So i guess I must change the iptables set up. Thanks . I mean really thanks a lot ! U rule !!!
Go to the top of the page
 
+Quote Post
net2know
post Jun 25 2004, 08:38 AM
Post #9


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 25-June 04
Member No.: 3,229



I am also new to Unix/Linux environment but, I would like to thanks to all of you for your postings. I was trying to use Port 443 as it was mention at the begining of the forum.

I change the /etc/init.d/iptable informaton adding a new line as mention by hughesjr which it hit it right on it. But still I was unable to connect to port 443, so I decided to reboot the box. After reboot the port was open.

Thank you all for you info. Because of you and the way you help one to each other I decided to become a member.

Very new to unix/linux, hope to learn from all of you.

laugh.gif biggrin.gif
Go to the top of the page
 
+Quote Post
hughesjr
post Jun 25 2004, 05:39 PM
Post #10


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



Welcome aboard!

Thanks for using the search function to find the fix for your problem. smile.gif

If you have any problems that need answers, feel free to ask...if you know any answers, please post those too!


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd October 2017 - 05:42 PM