Mac下 Terminal & iTerm2 SSH 免密登陆
terminal
The new Windows Terminal and the original Windows console host, all in the same place!
项目地址:https://gitcode.com/gh_mirrors/term/terminal
免费下载资源
·
一、修改服务器配置
1、先登录服务器然后修改服务器配置
[root@iZuf6d9y2x6c8r92unymr1Z pubkey]# vim /etc/ssh/sshd_config
#找到以下内容,去掉前面的注释(#)
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
#重启sshd服务
[root@iZuf6d9y2x6c8r92unymr1Z pubkey]# service sshd restart
二、修改MAC本地配置
2、修改本地配置
qierkang@erkangMacPro # ssh-keygen -t rsa
#一路回车即可。默认在~/.ssh 目录生成两个文件:
#id_rsa :私钥 id_rsa.pub :公钥
#将本地公钥复制到服务器
qierkang@erkangMacPro # scp ~/.ssh/id_rsa.pub root@你的公网IP:/home/pubkey/id_rsa.pub
#在服务器端将公钥文件导入认证文件中
[root@iZuf6d9y2x6c8r92unymr1Z pubkey]# cat /home/pubkey/id_rsa.pub >> ~/.ssh/authorized_keys
[root@iZuf6d9y2x6c8r92unymr1Z pubkey]# chmod 700 ~/.ssh
[root@iZuf6d9y2x6c8r92unymr1Z pubkey]# chmod 600 ~/.ssh/authorized_keys
#最后一步 修改 mac 下的配置文件~/.ssh/config (没有则创建)
qierkang@erkangMacPro # vim ~/.ssh/config
#添加这些内容
Host myprod ### 别名
Hostname 192.168.xx.xx ###公网
IP Port 22 ###端口
User root ###登录账号
IdentityFile ~/.ssh/id_rsa ###本机私钥地址
最终效果如下:
GitHub 加速计划 / term / terminal
8
0
下载
The new Windows Terminal and the original Windows console host, all in the same place!
最近提交(Master分支:4 个月前 )
25392ea6
CodeQL is raising errors when building Visual Studio since they have a
dependency on Windows Terminal for our integrated terminal. The issue
raised by CodeQL refers to a non-constant string format, but in this
case the string comes from a resource file and should be considered
constant. 4 天前
8ddb14bd
After #15855, this repo no longer uses submodules. Removing instruction
about needing to initialize them. 5 天前
更多推荐
已为社区贡献6条内容
所有评论(0)