Jump to content

/etc/services does not report correct ssh port# (SOLVED)


wmcneil

Recommended Posts

I recently upgraded to 6.8.2 .  I found the SSH port number in the GUI under setttings / management access, changed it to something other than the default of 22, rebooted, and the new port number is working.  But,  /etc/services still reports the default port of 22?

> cat /etc/services | grep -i ssh

 

ssh              22/tcp    #Secure Shell Login
ssh              22/udp    #Secure Shell Login
sshell          614/tcp    #SSLshell
sshell          614/udp
netconf-ssh     830/tcp    #NETCONF over SSH
netconf-ssh     830/udp    #NETCONF over SSH
x11-ssh         6010/tcp   #Unofficial name, for convenience
x11-ssh         6010/udp

Link to comment

/etc/services file is an information file documenting standard ports and name associated to it.

It does not document what ports on a server is running what service.

So like you have observed, the standard registered ssh port is 22, but you can run an ssh server on any port you choose/want.

Link to comment
14 hours ago, ken-ji said:

/etc/services file is an information file documenting standard ports and name associated to it.

It does not document what ports on a server is running what service.

So like you have observed, the standard registered ssh port is 22, but you can run an ssh server on any port you choose/want.

 After doing a little research, I found any three of these commands will report the actual port in use:

 netstat -tulpn | grep LISTEN    
 ss -tulpn  

 lsof -i -P -n | grep LISTEN

Link to comment
  • wmcneil changed the title to /etc/services does not report correct ssh port# (SOLVED)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...