KeyGen?

May 18, 2011 at 11:45 PM

Does the library have a keygen capability?  I saw that I can pass a keyfile to authenticate with a private key.  What format should that keyfile be in?  Bit of noob when it comes to working with keyfile and SSH.

 

May 19, 2011 at 8:16 AM

Hi

Note, the links I provide should open in a new window/tab if clicked on it.

The library doesn't have key gen capability, but you can generate keys using pyttygen from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Here is some reading for puttygen: http://winscp.net/eng/docs/ui_puttygen alternatively (same, but without screenshots) http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter8.html 

You pass your private key to SSH.NET, but before that you must put your public key on in the file ~/.ssh/authorized_keys to allow the SSH server to recognize your key. You may need to change your SSH server configuration as well, it is usually located in /etc/ssh/sshd_config, but make a backup of it before editing it.

You must never share your private key, doing so will compromise systems which allow you to login with your key pair.