LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-02-2012, 07:07 PM   #1
jbruyet
Member
 
Registered: Feb 2011
Location: North Central Washington
Distribution: Debian, OpenSUSE, Kali, Ubuntu
Posts: 178

Rep: Reputation: 7
Changed SSH port still running on port 22


Hey all, I'm trying to change my ssh port from 22 to something much higher and not having much luck. I changed the port designation in /etc/services

Code:
jobee@vmDeb6:~$ grep ssh /etc/services
# ssh-Moved     22/tcp                          # SSH Remote Login Protocol
# ssh-Moved     22/udp
ssh             13247/tcp                       # SSH Remote Login Protocol
ssh             13247/udp
and then ran

Code:
/etc/init.d/ssh restart
but I still can only connect ssh to port 22. I even rebooted my server and still no joy. Are there any additional steps that I missed???

Thanks,

Joe B
 
Old 08-02-2012, 07:11 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
The purpose of /etc/services is not to configure which ports things run on, it is simply a reference document that lists standard port numbers.

If you want to change the port a service runs on, you need to adjust that service's configuration file. In the case of SSH, it would be under /etc/sshd.
 
Old 08-02-2012, 11:59 PM   #3
jbruyet
Member
 
Registered: Feb 2011
Location: North Central Washington
Distribution: Debian, OpenSUSE, Kali, Ubuntu
Posts: 178

Original Poster
Rep: Reputation: 7
Thanks MS3FGX, I found it. It was actually under /etc/ssh but your instructions helped me find it. FWIW (and for anyone else looking for this information) the changes need to be made in sshd_config.

Thanks again,

Joe B
 
  


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 number used by server when using dynamic port forwarding in SSH? kreeder Linux - Networking 4 11-21-2011 03:07 PM
SSH is still listening on port 22 after change to a new port? boyla Linux - Server 6 04-08-2011 01:26 AM
Howto do Secured ssh from port https or port80(standard) to ssh d listening port 22 ? Xeratul Linux - General 4 11-23-2006 07:09 AM
iptables help! DROP ssh port, but allow to connect to ssh if from 2222 port kandzha Linux - Networking 4 09-13-2006 10:10 AM
Using serial port card(PCMCIA) with IPAQ running Linux, can't find ttyS0 port d2army Linux - Laptop and Netbook 0 11-12-2005 09:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:12 AM.

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