[TOC]

概述

文章参考:https://www.vsc.cc/article/100000.html

文章参考:https://zhuanlan.zhihu.com/p/68577071

上传本地SSH公钥

1
2
3
4
5
6
7
8
9
10
11
Last login: Sat Apr  9 23:11:03 on ttys000
(base) ➜ Downloads ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.1.11
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/frewen/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
frewen@192.168.1.11's password:

Number of key(s) added: 1

Now try logging into the machine, with: "ssh '192.168.1.11'"
and check to make sure that only the key(s) you wanted were added.