ARTS-S CentOS 7 ssh相关

修改默认端口

vi /etc/ssh/sshd_config
把Port的注释删除了改成自己想要的值
重启service sshd restart
或者sudo /etc/init.d/ssh restart

免密码登录

要确保能用户名和密码登录,然后再执行ssh-copy-id username@10.11.12.13再输入密码就可以了.

上传下载文件

上传

scp a.txt username@10.11.12.13:/home/username/a.txt

下载

scp username@10.11.12.13:/home/username/a.txt a.txt

posted on 2019-01-08 07:57  荷楠仁  阅读(122)  评论(0编辑  收藏  举报

导航