Unable to copy ~/.ssh/id_rsa.pub

前端 未结 8 2186
予麋鹿
予麋鹿 2021-01-29 21:37

I’m following in Generating SSH Keys, it says

sudo apt-get install xclip

Downloads and installs xclip. If you don\'t have <

8条回答
  •  你的背包
    2021-01-29 22:31

    Have read the documentation you've linked. That's totally silly! xclip is just a clipboard. You'll find other ways to copy paste the key... (I'm sure)


    If you aren't working from inside a graphical X session you need to pass the $DISPLAY environment var to the command. Run it like this:

    DISPLAY=:0 xclip -sel clip < ~/.ssh/id_rsa.pub
    

    Of course :0 depends on the display you are using. If you have a typical desktop machine it is likely that it is :0

提交回复
热议问题