luoxiaolei

常用命令

默认22端口访问

ssh x.x.x.x

指定端口访问

ssh x.x.x.x -p port

指定用户访问(默认是MacOS当前用户)

ssh user@x.x.x.x [-p port]

设置主机别名,快捷访问

vi ~/.ssh/config

复制如下内容粘贴至config文件末尾(按需修改)

# xx Server
Host alias
        HostName x.x.x.x
        Port port
        User root

使用

ssh alias

参考链接

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2021-06-28
  • 2021-04-24
  • 2021-12-15
  • 2021-06-08
  • 2022-03-01
猜你喜欢
  • 2022-12-23
  • 2021-04-01
  • 2021-12-10
  • 2021-09-30
  • 2021-12-10
相关资源
相似解决方案