{"id":254,"date":"2016-03-06T16:42:41","date_gmt":"2016-03-06T16:42:41","guid":{"rendered":"http:\/\/home.terra-india.de\/?p=254"},"modified":"2016-03-06T16:44:02","modified_gmt":"2016-03-06T16:44:02","slug":"ssh-und-pub-keys","status":"publish","type":"post","link":"http:\/\/www.denzrhf.de\/?p=254","title":{"rendered":"ssh und pub keys."},"content":{"rendered":"<p>ssh root@192.168.213.5 &#8222;vim-cmd vmsvc\/getallvms&#8220;<\/p>\n<p>ssh root@192.168.213.100 &#8222;vim-cmd vmsvc\/getallvms&#8220;<\/p>\n<p>Dazu ist ein Key-Austausch notwendig.<\/p>\n<p>http:\/\/www.online-tutorials.net\/security\/secure-ssh-tutorial-part-2-identity-pubkey-authentifizierung\/tutorials-t-69-202.html (DANKE)<\/p>\n<p>&nbsp;<\/p>\n<p>1: workstation key erzeugen (falls nicht vorhanden)<br \/>\n===================================================<br \/>\nworkstation:\/home\/simon# ssh-keygen -t rsa<br \/>\nGenerating public\/private rsa key pair.<br \/>\nEnter file in which to save the key (\/home\/simon\/.ssh\/id_rsa):<br \/>\nEnter passphrase (empty for no passphrase):<br \/>\nEnter same passphrase again:<br \/>\nYour identification has been saved in \/home\/simon\/.ssh\/id_rsa.<br \/>\nYour public key has been saved in \/home\/simon\/.ssh\/id_rsa.pub.<br \/>\nThe key fingerprint is:<br \/>\n01:4a:69:4a:81:16:f2:b9:aa:41:da:55:af:dd:34:ce simon@workstation<br \/>\nworkstation:<br \/>\nworkstation:\/home\/simon# cd $HOME\/.ssh\/<br \/>\nworkstation:~\/.ssh# ls<br \/>\nid_rsa id_rsa.pub<\/p>\n<p>&nbsp;<br \/>\n2: von workstation nach server public key kopieren<br \/>\n===================================================<br \/>\nworkstation:\/# cd $HOME\/.ssh\/<br \/>\nworkstation:\/home\/simon\/.ssh# scp id_rsa.pub simon@ssh-server:id_rsa_workstation.pub<br \/>\nPassword:<br \/>\nworkstation:\/home\/simon\/.ssh# ssh ssh-server -L simon<br \/>\nPassword:<br \/>\nssh-server:\/ cd $HOME<br \/>\nssh-server:\/home\/simon# mkdir .ssh &amp;&amp; chmod 700 .ssh &amp;&amp; cd .ssh<\/p>\n<p>&nbsp;<\/p>\n<p>Notes:<br \/>\nFor ESXi 5.x and 6.0, the location of authorized_keys is:<br \/>\n\/etc\/ssh\/keys-&lt;username&gt;\/authorized_keys<\/p>\n<p>Im Freenas:<br \/>\nVia GUI auf User den pub-key kopieren.<\/p>\n<p>&nbsp;<\/p>\n<p>3. auf Server Key aufnehmen<br \/>\n===========================<br \/>\n#Jetzt f\u00fcgen wir die Datei hinzu, die wir hochgeladen haben<br \/>\nssh-server:\/home\/simon\/.ssh# cat ..\/id_rsa_workstation.pub &gt;&gt; authorized_keys<br \/>\nssh-server:\/home\/simon\/.ssh# chmod 600 authorized_keys<br \/>\nssh-server:\/home\/simon\/.ssh# rm ..\/id_rsa_workstation.pub &amp;&amp; exit<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ssh root@192.168.213.5 &#8222;vim-cmd vmsvc\/getallvms&#8220; ssh root@192.168.213.100 &#8222;vim-cmd vmsvc\/getallvms&#8220; Dazu ist ein Key-Austausch notwendig. http:\/\/www.online-tutorials.net\/security\/secure-ssh-tutorial-part-2-identity-pubkey-authentifizierung\/tutorials-t-69-202.html (DANKE) &nbsp; 1: workstation key erzeugen [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=\/wp\/v2\/posts\/254"}],"collection":[{"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=254"}],"version-history":[{"count":3,"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":257,"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=\/wp\/v2\/posts\/254\/revisions\/257"}],"wp:attachment":[{"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}