+--- | | --== schamanek.net: public keys for putty ==-- | +--- | | We recommend the use of PuTTY (for Windows) to connect to schamanek.net. | This is best done with so-called public key authentication. Find here a | concise description of how to set up public key authentication with | PuTTY. Though, you may want to read our disclaimer first. | | For an illustrated but generic tutorial see the well written howto | Key-Based SSH Login With PuTTY by Falko Timme. | +--- | | we take for granted that you have installed PuTTY in c:\programs\putty. | to install PuTTY download and run putty-X.XX-installer.exe from | http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html | if you have no sessions defined get and run schamanek.net's putty.reg. | | creating your private and public key pair | | start c:\programs\putty\putty.exe and connect to schamanek.net (double- | click it in the 'Saved Sessions' list, enter your username and password). | now type the following 4 commands exactly as given here, just use your own | email address instead of mine. Confirm each line with the [Enter] key. | After the first line you will be asked for a passphrase which will become | the passphrase for your private key (to be used instead of your password). | You may want to copy and paste each line. To paste them into your PuTTY | window press Shift-Ins. | | ssh-keygen -t rsa -C andreas@schamanek.not -f ~/.ssh/id_rsa | mail -s "my private ssh key" andreas@schamanek.not < ~/.ssh/id_rsa | cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys2 | chmod 600 ~/.ssh/authorized_keys2 | | (ssh-keygen creates the key pair, mail sends the private key to you, | the 3rd line says that you shall be authorized to access your account, | chmod 600 is a technical requirement when using SSH; note that | sending your private key via email is considered risky; any other | secure transfer such as via SFTP is to be preferred if available.) | | converting your private key to putty's format | | you have received your private key by email. save it to a file, say | ssh_privkey.txt (e.g. do --> Start --> Run/Ausfuehren --> notepad [OK], | copy the private key including -----BEGIN/END lines, paste it into note- | pad, make sure there is 1 empty line after -----END ..., save the file | to ssh_privkey.txt). | | start c:\programs\putty\puttygen.exe, --> Conversions --> Import Key | load ssh_privkey.txt, you are asked for your passphrase (that you have | used while running ssh-keygen). enter your email address as 'Key comment'. | click on [Save private key], save the now converted key e.g. to | c:\programs\putty\ssh_privkey.ppk. close the putty key generator. | | setting up putty to use your private key | | first we create a shortcut that starts the putty key agent and loads | our private key. then we make this shortcut to start whenever we start | windows (or login to windows): | | click the right mouse key on the desktop (on an empty area), choose --> | New --> Shortcut/Verknuepfung, type in (including "s) | "c:\programs\putty\pageant.exe" "c:\programs\putty\ssh_privkey.ppk" | [Next], give it a name, [Finish]. | | test drive: double-click the shortcut. you should be asked for the pass- | phrase. once entered, you'll find a little blue computer with a black hat | at the mini icons taskbar. use putty.exe to connect to schamanek.net, | enter your username and wait. you should be logged in without password. | | make the shortcut autostart: click with the right mouse key on it and | drag it onto --> Start --> Programs --> Startup (wait until the | Startup menu opens, drag to the open Startup menu, then release the key), | choose Copy or Move. that's it. | | finish (optional, but here starts the fun part) | | create your own putty session. start putty.exe and choose a suitable | session e.g. my tunnel2schamanek.net session, load it by clicking [Load]. | Use the menu on the left to modify it (at least enter your username in | category 'Connection' at Auto-login username), go back to 'Session' (the | very first category), give your modified session a new name in the field | "Saved Sessions", e.g. me@tunnel2schamanek.net, --> [Save], [Cancel]. | | now create a shortcut for your session: right-click on the desktop, --> | New --> Shortcut, enter | "c:\programs\putty\putty.exe" @me@tunnel2schamanek.net | [Next], give it a name, e.g. "my tunnel", [Finish]. that's it. | when you double-click this shortcut you should get connected without | any further action. | | access other accounts of yours with the same key | | just log in to your account on schamanek.net and run the following | command: | | ssh-copy-id myusername@myotherserver | | this will ask you to log in to myotherserver and then copies your public | key to this server. afterwards, you should be able to connect to this | account either through your schamanek.net account or with putty (you | might want to create another session) without the need of a password. | | | i hope you come to like it as much as i do. | | +--- URI: http://www.schamanek.net/ssh/puttygen.htm (c) schamanek.net lastmod 2007-08-30 by (webadmin) Disclaimer the information here is provided "as is", without warranty of any kind express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. in no event shall the copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the information or the use or other dealings in the information here. (top of page)