{"id":4,"date":"2008-04-10T18:10:06","date_gmt":"2008-04-10T16:10:06","guid":{"rendered":"http:\/\/www.mediamill.de\/blog\/2008\/03\/05\/ssh-login-mit-ssh-key-authentication-ohne-passworteingabe\/"},"modified":"2008-04-07T00:07:16","modified_gmt":"2008-04-06T22:07:16","slug":"ssh-login-mit-ssh-key-authentication-ohne-passworteingabe","status":"publish","type":"post","link":"https:\/\/www.mediamill.de\/blog\/2008\/04\/10\/ssh-login-mit-ssh-key-authentication-ohne-passworteingabe\/","title":{"rendered":"SSH Login ohne Passworteingabe mit SSH Key Authentication"},"content":{"rendered":"<p>Mit dem Befehl<\/p>\n<p class=\"codeblock\">ssh-keygen -t rsa<\/p>\n<p>wird ein Schl\u00fcsselpaar aus \u00f6ffentlichem und privatem Schl\u00fcssel generiert. Die beiden Dateien mit den Schl\u00fcsseln werden im Ordner ~\/.ssh erstellt.<br \/>\n~\/.ssh\/id_rsa        Privater ServerKey<br \/>\n~\/.ssh\/id_rsa.pub    Public Key<\/p>\n<p>Nun muss noch der eigene Public Key auf dem Remote Server installiert werden. Der Befehl<\/p>\n<p class=\"codeblock\">ssh-copy-id -i ~\/.ssh\/id_rsa.pub user@remoteserver<\/p>\n<p>h\u00e4ngt den eigenen Public Key an die Datei ~\/.ssh\/authorized_keys des Remote Servers.<\/p>\n<p>Ob das Ganze erfolgreich war, kann man nun mit dem Befehl<\/p>\n<p class=\"codeblock\">ssh user@remoteserver<\/p>\n<p>testen. Wenn bei der Schl\u00fcsselgenerierung keine Passphrase angegeben wurde, sollte die ssh-Verbindung nun automatisch aufgebaut werden. Dies ist unter anderem sehr n\u00fctzlich, wenn eine SSH Verbindung per Script automatisch aufgebaut werden soll.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mit dem Befehl ssh-keygen -t rsa wird ein Schl\u00fcsselpaar aus \u00f6ffentlichem und privatem Schl\u00fcssel generiert. Die beiden Dateien mit den Schl\u00fcsseln werden im Ordner ~\/.ssh erstellt. ~\/.ssh\/id_rsa Privater ServerKey ~\/.ssh\/id_rsa.pub Public Key Nun muss noch der eigene Public Key auf dem Remote Server installiert werden. Der Befehl ssh-copy-id -i ~\/.ssh\/id_rsa.pub user@remoteserver h\u00e4ngt den eigenen Public [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4,6,7],"tags":[],"class_list":["post-4","post","type-post","status-publish","format-standard","hentry","category-linux","category-ssh","category-tipps","category-unix-befehle"],"_links":{"self":[{"href":"https:\/\/www.mediamill.de\/blog\/wp-json\/wp\/v2\/posts\/4","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mediamill.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mediamill.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mediamill.de\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mediamill.de\/blog\/wp-json\/wp\/v2\/comments?post=4"}],"version-history":[{"count":0,"href":"https:\/\/www.mediamill.de\/blog\/wp-json\/wp\/v2\/posts\/4\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.mediamill.de\/blog\/wp-json\/wp\/v2\/media?parent=4"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mediamill.de\/blog\/wp-json\/wp\/v2\/categories?post=4"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mediamill.de\/blog\/wp-json\/wp\/v2\/tags?post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}