远程链接
打开 iTerm2,通过 ssh 命令连接 linux 服务器,命令:
1 | root 是服务器账户名,@ 后面的是购买的公网 ip 地址 |
ssh 配置 config 快速登录服务器
可先通过 ssh-keygen -t rsa 生成密钥。客户端(自己 Mac 的配置):
1 | ➜ ~ cd ~/.ssh |
配置 config (没有的话自己新建一个)
Host:是别名ubuntuHostName:为IPPort:为端口User:为用户名
配置好后可直接用 ssh ubuntu 这条命令进行登录。
If you like this blog or find it useful for you, you are welcome to comment on it. You are also welcome to share this blog, so that more people can participate in it. If the images used in the blog infringe your copyright, please contact the author to delete them. Thank you !