Jump to content

Can't change SSH port


Go to solution Solved by libook,

Recommended Posts

I changed the SSH port to 2022 in WebUI, but the actual port is still 22.

 

Also after `/etc/rc.d/rc.ssh restart`.

 

root@LiNas:~# cat /boot/config/ident.cfg |grep SSH
USE_SSH="yes"
PORTSSH="2022"
root@LiNas:~# cat /etc/ssh/sshd_config |grep Port
Port 22
GatewayPorts no
root@LiNas:~# lsof -Pi :22
COMMAND   PID USER   FD   TYPE    DEVICE SIZE/OFF NODE NAME
sshd    28306 root    3u  IPv4 232676830      0t0  TCP linas.lan:22 (LISTEN)
root@LiNas:~# lsof -Pi :2022
root@LiNas:~# 

 

It seems configure file in flash was changed, but sshd didn't use it.

linas-diagnostics-20240117-1407.zip

Link to comment

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...