知识的领域是无限的,我们的学习也是无限期的。这篇文章主要讲述ssh常用命令总结相关的知识,希望能为你提供帮助。
简单用法
>
ssh rumenz.com
rumenz@rumenz.com\'s password:
指定用户名登录
方法一
>
ssh -l rumenz rumenz.com
方法二
>
ssh rumenz@rumenz.com
指定端口登录登录
>
ssh rumenz@rumenz.com -p 1234
修改SSH的默认端口
>
vim /etc/ssh/ssh_config
Port 1234//重启ssh
>
systemctl restart sshd.service
对所有数据请求压缩
>
ssh -C rumenz@rumenz.com
打开调试模式
>
ssh -v rumenz@rumenz.comOpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to rumenz.com port 22.
debug1: Connection established.
debug1: identity file /Users/mac/.ssh/id_rsa type 0
debug1: identity file /Users/mac/.ssh/id_rsa-cert type -1
debug1: identity file /Users/mac/.ssh/id_dsa type -1
debug1: identity file /Users/mac/.ssh/id_dsa-cert type -1
debug1: identity file /Users/mac/.ssh/id_ecdsa type -1
debug1: identity file /Users/mac/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/mac/.ssh/id_ed25519 type -1
debug1: identity file /Users/mac/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/mac/.ssh/id_xmss type -1
debug1: identity file /Users/mac/.ssh/id_xmss-cert type -1
...
绑定源地址
>
ssh -b 1.2.3.4 rumenz@rumenz.com
远程执行命令
>
ssh rumenz@rumenz.com ls -l
挂载远程文件系统
>
sshfs -o idmap=user user@hostname:/home/user ~/Remote
>
sshfs -o idmap=user rumenz@rumenz.com:/home/pi ~/rumenz
【ssh常用命令总结】原文链接:https://rumenz.com/rumenbiji/ssh-common-commands.html
微信公众号:入门小站
推荐阅读
- oeasy教您玩转vim - 52 - # 正则查找
- centos安裝源碼包nginx報錯
- nfs文件共享服务器精讲
- oeasy教您玩转vim - 51 - # 读写文件
- linux手误rm可能不需要跑路
- 邮件头之
- Linunx 系统挂载新硬盘的四种姿势
- Zabbix6.0LTS:监控的一大飞跃,峰会议程发布,免费观看全球直播!
- 你对Linux了解多少?看看不吃亏!