linux修改ssh端口和禁止root远程登陆设置

5

linux修改ssh端口22

vi /etc/ssh/sshd_config

找到#port 22
将前面的#去掉,然后修改端口 port 1234
重启服务就OK了
service sshd restart


为增强安全
先增加一个普通权限的用户,并设置密码

useradd test
passwd test

然后禁止ROOT远程SSH登录:

vi /etc/ssh/sshd_config

把其中的
PermitRootLogin yes
改为
PermitRootLogin no
重启sshd服务

service sshd restart

远程管理用普通用户test登录,然后用 su root 切换到root用户就可以拿到最高权限

暧味日志

Tags: , ,

5 Responses

  1. 小杰 says:

    第一次来,沙发了~~

  2. Firm says:

    大一的时候有看过

  3. Solo says:

    挺简单的哈。

  4. 从零开始 says:

    一般接触linux的都需要知道 谢谢分享

Leave a Reply

© 2007-2010 猫言猫语. All rights reserved. Powered by WordPress. 14 queries in 0.118 seconds.
Proudly designed by Theme Junkie.