Skip to content

Instantly share code, notes, and snippets.

@marcus-at-localhost
Last active September 3, 2015 16:15
Show Gist options
  • Select an option

  • Save marcus-at-localhost/8c8801909a1165ce5daf to your computer and use it in GitHub Desktop.

Select an option

Save marcus-at-localhost/8c8801909a1165ce5daf to your computer and use it in GitHub Desktop.
SSH in Windows
  1. puttygen.exe erzeugt privaten und öffentlichen Key.
  2. Speichere privaten Key mit Passwort als *.ppk
  3. Exportiere privaten Key als Open SSH Datei, um von Git & Co verwendet werden zu können.
  4. Lade die *.ppk Datei in pageant.exe dem Auth Agenten/Schlüsselmanager (Muss bei jedem Systemneustart erneut gemacht werden)
  5. Der öffentliche Schlüssel ssh-rsa AAAA...base64== rsa-key-20150903 wird auf dem Server in die Datei /.ssh/authorized_keys kopiert (musste vom Provider hinzugefügt werden)
  6. Test mit putty.exe ob man sich ohne Passwort per ssh einloggen kann.
  7. Kopiere die den privaten Key (openssh Datei) in das Verzeichnis C:\Users\xo\.ssh\ und nenne die Datei id_rsa -> Info
  8. Setze die Umgebungsvariablen GIT_SSH=E:\xampp\Putty\plink.exe und PATH=E:\xampp\Putty\ Info
  9. Starte Console2 oder CMD und verbinde dich mit dem Server ssh [email protected] -p 22
    Es wird nach dem Passwort der *.ppk Datei gefragt, warum?
  10. Besser: plink -ssh web@host -P 22 und die Eingabe des Passwortes entfällt ganz
Referenzen:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment