Fedora Linux Support Community & Resources Center
  #1  
Old 22nd May 2006, 04:08 PM
talkstock888 Offline
Registered User
 
Join Date: Feb 2005
Posts: 177
ssh

i try to change ssh default port 22 to some # i want to. please help with detail
Reply With Quote
  #2  
Old 22nd May 2006, 04:26 PM
ccrvic Offline
Registered User
 
Join Date: Apr 2006
Posts: 1,092
Quote:
Originally Posted by talkstock888
i try to change ssh default port 22 to some # i want to. please help with detail
man sshd_config

Vic.
Reply With Quote
  #3  
Old 22nd May 2006, 04:26 PM
tebbens Offline
Registered User
 
Join Date: Aug 2005
Posts: 290
edit /etc/ssh/sshd_config

#Port 22 is default and commented out.
Change it to anything you want...
Port 1234

Then restart sshd.
service sshd restart

ps.
Do this locally... if your logged in via SSH, you will be dropped.
Reply With Quote
  #4  
Old 22nd May 2006, 05:53 PM
talkstock888 Offline
Registered User
 
Join Date: Feb 2005
Posts: 177
i changed in /etc/ssh
then vi sshd_config
#Port22 remove # (Port 81)
/etc/init.d/sshd restart
after changed i go to my desktop putty change port to 81
do not connect, does any one know why?
Reply With Quote
  #5  
Old 22nd May 2006, 05:55 PM
ccrvic Offline
Registered User
 
Join Date: Apr 2006
Posts: 1,092
Quote:
Originally Posted by talkstock888
#Port22 remove # (Port 81)
"#" introduces a comment. Modifying comments doesn't change your configuration.

Vic.
Reply With Quote
  #6  
Old 22nd May 2006, 06:03 PM
talkstock888 Offline
Registered User
 
Join Date: Feb 2005
Posts: 177
do not understand what you mean CCRVIC
Reply With Quote
  #7  
Old 22nd May 2006, 06:07 PM
tebbens Offline
Registered User
 
Join Date: Aug 2005
Posts: 290
sshd_config should contain a Port entry WITHOUT a #...

Port 1234

After saving the file restart sshd.
Check to see if your system is listening on the port with:
netstat -tuna
You should see an entry with the port you specified.

Matthew
Reply With Quote
  #8  
Old 23rd May 2006, 09:37 PM
talkstock888 Offline
Registered User
 
Join Date: Feb 2005
Posts: 177
my server OS is fedora 4
i vi in sshd_config change #Port 22 ------> Port 20000 and restart sshd is find
after netstat -tuna ssh port still 22 do not change it also i test in putty do not connected either.
Reply With Quote
Reply

Tags
ssh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump


Current GMT-time: 09:37 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat