修改默认端口
vi /etc/ssh/sshd_config
把Port的注释删除了改成自己想要的值
重启service sshd restart
免密码登录
要确保能用户名和密码登录,然后再执行ssh-copy-id [email protected]再输入密码就可以了.
上传下载文件
上传
scp a.txt [email protected]:/home/username/a.txt
下载
scp [email protected]:/home/username/a.txt a.txt