访问Macbook中生成的自己的ssh密钥

时间:2019-11-20 14:47:39

标签: macos ssh terminal

我正在尝试生成一个ssh密钥对,以检索我的教授以加载到服务器上。

我有一台Macbook Air(2015年),我按照siteground.com在线提供的Mac OS生成说明进行操作。

这是代码:

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/.ssh/id_rsa.
Your public key has been saved in /Users/.ssh/id_rsa.pub.
The key fingerprint is:
vaRiOusLeTteRs
The key's randomart image is:
----Itookthisout


现在的问题是,当我尝试访问它时,会发生这种情况:我获得了拒绝的权限。如何检索.pub密钥以将其发送过来?

(基本)MacBook-Air-2:〜/Users/.ssh/id_rsa.pub -bash:/Users/.ssh/id_rsa.pub:权限被拒绝

谢谢!

1 个答案:

答案 0 :(得分:0)

问题已由qasimalbaqali解决,由于他只留下评论,因此我将其用作接受的问题。再次感谢!