linux ubuntu 修改ssh端口号

查看ssh端口

netstat -atunlp | grep sshd

修改端口号

目标文件【/etc/ssh/sshd_config】
修改port
在这里插入图片描述

重启ssh

sudo systemctl restart ssh

再次查看ssh端口

netstat -atunlp | grep sshd

成功