{"id":2545,"date":"2024-09-23T16:05:01","date_gmt":"2024-09-23T14:05:01","guid":{"rendered":"http:\/\/clark.tipistrani.it\/?p=2545"},"modified":"2024-09-23T16:05:01","modified_gmt":"2024-09-23T14:05:01","slug":"configurare-ssh-con-parametri-specifici-per-specifici-hosts","status":"publish","type":"post","link":"http:\/\/clark.tipistrani.it\/?p=2545","title":{"rendered":"Configurare SSH con parametri specifici per specifici hosts"},"content":{"rendered":"<p>La novit\u00e0 odierna \u00e8 questa, facendo ssh su uno switch della CISCO mi vedo restituire questo messaggio:<\/p>\n<p>clerk@pc0:~$ lerici<br \/>\nUnable to negotiate with 192.168.2.19 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1<\/p>\n<p>N.B. lerici nome della macchina \u00e8 in realt\u00e0 un alias cos\u00ec scritto:<\/p>\n<p>alias lerici=&#8217;ssh -c aes128-cbc admin@192.168.2.19&#8242;<br \/>\nRapida ricerca in Internet e trovo che modificando il file \/etc\/ssh\/ssh_config (il client) risolvo, perfetto mi dico modifico e fine della cosa, peccato che 2 minuti dopo facendo ssh su un altra macchina mi da errore, quindi riprendo a cercare e trovo che \u00e8 possibile scrivere un config per ss nella propria directory \/home\/.ssh visto che gli switch sono 2 il file config con permessi 600 nella mia directory .ssh \u00e8 :<\/p>\n<p>Host 192.168.2.18<br \/>\nCiphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc<br \/>\nMACs hmac-md5,hmac-sha1,umac-64@openssh.com<br \/>\nHostkeyAlgorithms ssh-dss,ssh-rsa<br \/>\nKexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group14-sha1<br \/>\nHost 192.168.2.19<br \/>\nCiphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc<br \/>\nMACs hmac-md5,hmac-sha1,umac-64@openssh.com<br \/>\nHostkeyAlgorithms ssh-dss,ssh-rsa<br \/>\nKexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group14-sha1<\/p>\n<p>con questa aggiunta la chiamata ssh va a buon fine senza problemi.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>La novit\u00e0 odierna \u00e8 questa, facendo ssh su uno switch della CISCO mi vedo restituire questo messaggio: clerk@pc0:~$ lerici Unable to negotiate with 192.168.2.19 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 N.B. lerici nome della macchina \u00e8 in realt\u00e0 un alias cos\u00ec scritto: alias lerici=&#8217;ssh -c aes128-cbc admin@192.168.2.19&#8242; Rapida ricerca in [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,7],"tags":[292,291,68],"class_list":["post-2545","post","type-post","status-publish","format-standard","hentry","category-linux","category-sistemi-operativi","tag-cisco","tag-diffie-hellman","tag-ssh"],"_links":{"self":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/2545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2545"}],"version-history":[{"count":1,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/2545\/revisions"}],"predecessor-version":[{"id":2546,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/2545\/revisions\/2546"}],"wp:attachment":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2545"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}