Read the documentation you linked. This is totally stupid! xclip is just a clipboard. You will find other ways to copy the key paste ... (I'm sure)
If you are not working from within the graphical X session, you need to pass the $DISPLAY var var command to the command. Run it as follows:
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 computer, it is likely that it :0
hek2mgl Sep 09 '13 at 10:15 2013-09-09 10:15
source share