2020年5月5日星期二

GCP Centos7 改ROOT SSH端口 && 启用rc.local

sudo -i

passwd root
新建root密码

修改sshd_config
sudo vi /etc/ssh/sshd_config

# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 22
Port 2244
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

PermitRootLogin改为yes
PermitEmptyPasswords改为yes


新建 SELinux监听ssh 2244
sudo semanage port -a -t ssh_port_t -p tcp 2244
sudo firewall-cmd --permanent --zone=public --add-port=2244/tcp

reboot 后可从22和2244 SSH登入。
如有问题请用22重新登入修正。没问题的话sshd_config去掉22即可

===============启用rc.local======================

chmod +x /etc/rc.d/rc.local
ll /etc/rc.d/rc.local


没有评论:

发表评论

转-汇丰香港开户详细教程(无须中介)

https://www.nodeseek.com/post-265532-1 汇丰香港,作为一家外资银行,同时也是香港三大具备发钞资格的银行之一,其全球业务网络广泛覆盖80余个国家和地区,稳居全球银行业前列。在香港开设银行账户时,汇丰香港是必开的香港银行账户之一。 一、开户前准备...