{"id":1267,"date":"2018-10-21T00:36:56","date_gmt":"2018-10-20T16:36:56","guid":{"rendered":"http:\/\/www.yusian.com\/blog\/?p=1267"},"modified":"2018-10-21T00:36:56","modified_gmt":"2018-10-20T16:36:56","slug":"%e5%85%b3%e4%ba%8essh%e7%9a%84%e5%87%a0%e4%b8%aa%e9%ab%98%e7%ba%a7%e7%94%a8%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/project\/2018\/10\/21\/0036561267.html","title":{"rendered":"\u5173\u4e8eSSH\u7684\u51e0\u4e2a\u9ad8\u7ea7\u7528\u6cd5"},"content":{"rendered":"<p><strong>1\u3001SSH\u8bc1\u4e66\u8ba4\u8bc1\u7684\u5b9e\u73b0<\/strong><br \/>\n1.1\u3001\u672c\u5730\u751f\u6210\u8bc1\u4e66<br \/>\n\u6700\u7b80\u5355\u7684\u8bd5\u4e3a\uff1assh-keygen\u547d\u4ee4\uff0c\u540e\u7eed\u8f93\u5165\u6216\u9009\u62e9\u63d0\u793a\u76f4\u63a5\u56de\u8f66\u56de\u8f66\uff0c\u6700\u7ec8\u4f1a\u5728~\/.ssh\/\u76ee\u5f55\u4e2d\u751f\u6210\u4e00\u4e2aid_rsa.pub\u7684\u6587\u4ef6<br \/>\n1.2\u3001\u672c\u5730\u516c\u94a5\u8ffd\u52a0\u5230\u670d\u52a1\u5668\u8ba4\u8bc1\u5217\u8868<br \/>\nssh-copy-id root@xxxxxx \u56de\u8f66\uff0c\u7136\u540e\u8f93\u5165\u5bc6\u7801\u5373\u53ef\u641e\u5b9a\uff01<br \/>\n\u6216\u8005\u5148\u5c06id_rsa.pub\u6587\u4ef6\u62f7\u8d1d\u5230\u670d\u52a1\u5668\u4e0a\uff0c\u7136\u540e\u901a\u8fc7cat id_rsa.pub >> ~\/.ssh\/authroized_keys\uff0c\u6548\u679c\u662f\u4e00\u6837\u7684<\/p>\n<p><strong>2\u3001\u8fdc\u7a0b\u62f7\u8d1d\u6587\u4ef6scp\u547d\u4ee4<\/strong><br \/>\nscp xxx root@xxxx:~\/xxxx \u5373\u53ef<br \/>\n\u5982\u679c\u6709\u7aef\u53e3\uff0c\u5219scp -P 22 root@xxxx:~\/xxx<\/p>\n<p><strong>3\u3001ssh\u901a\u8fc7usb\u8f6c\u53d1<\/strong><br \/>\n3.1\u3001\u6b63\u5e38\u60c5\u51b5\u4e0bssh\u90fd\u662f\u901a\u8fc7\u7f51\u7edc\u4f20\u8f93\u7684\uff0c\u4f46\u4e5f\u53ef\u4ee5\u901a\u8fc7usb\u8fdb\u884c\u8f6c\u53d1<br \/>\n3.2\u3001\u901a\u8fc7usbmuxd\u53ef\u5b9e\u73b0usb\u8f6c\u53d1\uff0c\u4e0b\u8f7dusbmuxd http:\/\/cgit.sukimashita.com\/usbmuxd.git\/snapshot\/usbmuxd-1.0.8.tar.gz<br \/>\n3.3\u3001\u5c06python-client\u76ee\u5f55\u4e0b\u7684tcprelay.py\u548cusbmuxd.py\u4e24\u6587\u4ef6\uff0c\u590d\u5236\u51fa\u6765\u5373\u53ef<br \/>\n3.4\u3001\u6267\u884cpython pyhon-client\/tcprelay.py -t 22:xxxx\uff0c\u8fd9\u6761\u547d\u4ee4\u6267\u884c\u540e\u5904\u4e8e\u76d1\u542c\u72b6\u6001\uff0c\u4e0d\u53ef\u5173\u95ed\u6216\u7ed3\u675f\u5f53\u524d\u7ec8\u7aef\u8fdb\u7a0b<br \/>\n3.5\u3001ssh root@localhost:xxxx \u5373\u4e3a\u767b\u5f55usb\u8bbe\u5907\u768422\u53f7\u7aef\u53e3\u4e86<\/p>\n<p><strong>4\u3001ssh\u767b\u5f55\u540e\uff0c\u4e2d\u6587\u8f93\u5165\u7684\u95ee\u9898<\/strong><br \/>\n4.1\u3001\u5728\u670d\u52a1\u5668\u7684~\/\u76ee\u5f55\u4e2d\u65b0\u589e.inputrc<br \/>\n4.2\u3001\u6587\u4ef6\u5185\u5bb9\u4e3a\uff1a<br \/>\n<code>set convert-meta off<br \/>\nset output-meta on<br \/>\nset meta-flag on<br \/>\nset input-meta on<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001SSH\u8bc1\u4e66\u8ba4\u8bc1\u7684\u5b9e\u73b0 1.1\u3001\u672c\u5730\u751f\u6210\u8bc1\u4e66 \u6700\u7b80\u5355\u7684\u8bd5\u4e3a\uff1assh-keygen\u547d\u4ee4\uff0c\u540e\u7eed\u8f93\u5165\u6216\u9009\u62e9\u63d0\u793a\u76f4\u63a5\u56de\u8f66\u56de\u8f66\uff0c\u6700\u7ec8\u4f1a\u5728~\/.ssh\/\u76ee\u5f55\u4e2d\u751f\u6210\u4e00\u4e2aid_rsa.pub\u7684\u6587\u4ef6 1.2\u3001\u672c\u5730\u516c\u94a5\u8ffd\u52a0\u5230\u670d\u52a1\u5668\u8ba4\u8bc1\u5217\u8868 ssh-copy-id root@xxxxxx \u56de\u8f66\uff0c\u7136\u540e\u8f93\u5165\u5bc6\u7801\u5373\u53ef\u641e\u5b9a\uff01 \u6216\u8005\u5148\u5c06id_rsa.pub\u6587\u4ef6\u62f7\u8d1d\u5230\u670d\u52a1\u5668\u4e0a\uff0c\u7136\u540e\u901a\u8fc7cat id_rsa.pub >> ~\/.ssh\/authroized_keys\uff0c\u6548\u679c\u662f\u4e00\u6837\u7684 2\u3001\u8fdc\u7a0b\u62f7\u8d1d\u6587\u4ef6scp\u547d\u4ee4 scp xxx root@xxxx:~\/xxxx \u5373\u53ef \u5982\u679c\u6709\u7aef\u53e3\uff0c\u5219scp -P 22 root@xxxx:~\/xxx 3\u3001ssh\u901a\u8fc7usb\u8f6c\u53d1 3.1\u3001\u6b63\u5e38\u60c5\u51b5\u4e0bssh\u90fd\u662f\u901a\u8fc7\u7f51\u7edc\u4f20\u8f93\u7684\uff0c\u4f46\u4e5f\u53ef\u4ee5\u901a\u8fc7usb\u8fdb\u884c\u8f6c\u53d1 3.2\u3001\u901a\u8fc7usbmuxd\u53ef\u5b9e\u73b0usb\u8f6c\u53d1\uff0c\u4e0b\u8f7dusbmuxd http:\/\/cgit.sukimashita.com\/usbmuxd.git\/snapshot\/usbmuxd-1.0.8.tar.gz 3.3\u3001\u5c06python-client\u76ee\u5f55\u4e0b\u7684tcprelay.py\u548cusbmuxd.py\u4e24\u6587\u4ef6\uff0c\u590d\u5236\u51fa\u6765\u5373\u53ef 3.4\u3001\u6267\u884cpython pyhon-client\/tcprelay.py -t 22:xxxx\uff0c\u8fd9\u6761\u547d\u4ee4\u6267\u884c\u540e\u5904\u4e8e\u76d1\u542c\u72b6\u6001\uff0c\u4e0d\u53ef\u5173\u95ed\u6216\u7ed3\u675f\u5f53\u524d\u7ec8\u7aef\u8fdb\u7a0b 3.5\u3001ssh root@localhost:xxxx \u5373\u4e3a\u767b\u5f55usb\u8bbe\u5907\u768422\u53f7\u7aef\u53e3\u4e86 4\u3001ssh\u767b\u5f55\u540e\uff0c\u4e2d\u6587\u8f93\u5165\u7684\u95ee\u9898 4.1\u3001\u5728\u670d\u52a1\u5668\u7684~\/\u76ee\u5f55\u4e2d\u65b0\u589e.inputrc 4.2\u3001\u6587\u4ef6\u5185\u5bb9\u4e3a\uff1a set convert-meta off set output-meta on set meta-flag on set input-meta on<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[119,118],"class_list":["post-1267","post","type-post","status-publish","format-standard","hentry","category-project","tag-linux","tag-ssh"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/1267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=1267"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/1267\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=1267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=1267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=1267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}