Skip to content

Instantly share code, notes, and snippets.

@real-jiakai
Created January 9, 2023 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save real-jiakai/2bae6ac32f51e2f1a831b82ceb8889e5 to your computer and use it in GitHub Desktop.
Save real-jiakai/2bae6ac32f51e2f1a831b82ceb8889e5 to your computer and use it in GitHub Desktop.
修改vps的端口号
# ubuntu更改ssh端口的流程
# 用vim编辑器打开ssh的配置文件
vi /etc/ssh/sshd_config

# 命令模式下,输入G(大写),跳转至文件的最后一行
# 将默认的ssh端口22更改为23456
PasswordAuthentication yes
PermitRootLogin yes
+ Port 23456

# 重启ssh服务
/etc/init.d/ssh restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment