简体   繁体   English

无法将SSH密钥复制到剪贴板

[英]Failing to copy ssh key to clipboard

I'm trying to copy an ssh key from my Linux VM but whenever I type 我正在尝试从Linux VM复制ssh密钥,但是无论何时键入

xclip -sel < ~/.ssh/id_rsa.pub`

I am prompted with: 系统提示我:

Error: Can't display: (null)

I've been trying to follow https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/#platform-linux 我一直在尝试遵循https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/#platform-linux

Tools that start with X are usually related to Xorg graphical system. 以X开头的工具通常与Xorg图形系统有关。 If you have only console access to virtual machine, xclip will obviously not allow you to copy to your system clipboard. 如果您只有控制台访问虚拟机,则xclip显然将不允许您复制到系统剪贴板。 It would be possible with some *DE and some extensions. 一些* DE和一些扩展名是可能的。

Tip: If xclip isn't working, you can locate the hidden .ssh folder, open the file in your favorite text editor, and copy it to your clipboard. 提示:如果xclip不起作用,则可以找到隐藏的.ssh文件夹,在您喜欢的文本编辑器中打开文件,然后将其复制到剪贴板。

Just transfer ( scp , FileZilla, whatever you prefer) the file to your host system and open it in your favorite editor as the Tip above suggests. 只需将文件传输( scp ,FileZilla,无论您喜欢使用什么)到主机系统,然后按照上面的提示提示,在您喜欢的编辑器中将其打开。 And copy from there. 然后从那里复制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM