I’m following in Generating SSH Keys, it says
sudo apt-get install xclip
# Downloads and installs xclip. If you don't have
apt-get
, you might need to use another installer (likeyum
)xclip -sel clip < ~/.ssh/id_rsa.pub
# Copies the contents of the id_rsa.pub file to your clipboard
But after I runxclip -sel clip < ~/.ssh/id_rsa.pub
I get Error: Can't open display: (null)
What is the problem? I googled around but found nothing about it
In case you are trying to use xclip on remote host just add -X to your ssh command
More detailed information can be found here : https://askubuntu.com/a/305681
Try this and it will work like a charm. I was having the same error but this approach did the trick for me: