{"id":45920,"date":"2025-07-30T01:51:14","date_gmt":"2025-07-29T17:51:14","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/45920.html"},"modified":"2025-07-30T01:51:14","modified_gmt":"2025-07-29T17:51:14","slug":"%e5%9b%bd%e4%ba%a7linux%e9%93%b6%e6%b2%b3%e9%ba%92%e9%ba%9f%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e4%b8%8a%e4%bd%bf%e7%94%a8%e8%87%aa%e5%b8%a6openssh%e8%bf%9c%e7%a8%8b%e5%b7%a5%e5%85%b7ssh%e6%96%b9","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/45920.html","title":{"rendered":"\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528\u81ea\u5e26openssh\u8fdc\u7a0b\u5de5\u5177SSH\u65b9\u5f0f\u767b\u9646\u534e\u4e3a\u4ea4\u6362\u673a\u6216\u670d\u52a1\u5668"},"content":{"rendered":"<p>\u5728Windows\u548cLinux Debian\u7cfb\u7edf\u4e0a\u6211\u4e00\u76f4\u4f7f\u7528electerm\u8fdc\u7a0b\u5de5\u5177\u8bbf\u95ee\u670d\u52a1\u5668\u6216\u4ea4\u6362\u673a&#xff0c;<\/p>\n<h5>\u4e00\u3001 electerm\u7b80\u4ecb<\/h5>\n<ul>\n<li>\u7b80\u4ecb&#xff1a;electerm\u662f\u4e00\u6b3e\u5f00\u6e90\u514d\u8d39\u7684SSH\u5de5\u5177&#xff0c;\u5177\u6709\u826f\u597d\u7684\u8de8\u5e73\u53f0\u517c\u5bb9\u6027&#xff0c;\u9002\u7528\u4e8eWindows\u3001macOS\u3001Linux\u4ee5\u53ca\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u3002<\/li>\n<li>\u7279\u70b9&#xff1a;\n<ul>\n<li>\u5f00\u6e90\u514d\u8d39&#xff1a;\u7528\u6237\u53ef\u4ee5\u5728GitHub\u4e0a\u627e\u5230\u5b83\u7684\u6e90\u4ee3\u7801&#xff0c;\u81ea\u7531\u5730\u4e0b\u8f7d\u548c\u4f7f\u7528&#xff0c;\u65e0\u9700\u62c5\u5fc3\u7248\u6743\u548c\u8bb8\u53ef\u95ee\u9898\u3002<\/li>\n<li>\u529f\u80fd\u5168\u9762&#xff1a;\u4e0d\u4ec5\u652f\u6301SSH\u8fde\u63a5&#xff0c;\u8fd8\u652f\u6301FTP\/SFTP\u6587\u4ef6\u4f20\u8f93&#xff0c;\u65b9\u4fbf\u7528\u6237\u8fdb\u884c\u6587\u4ef6\u7ba1\u7406\u3002<\/li>\n<li>\u7528\u6237\u754c\u9762\u53cb\u597d&#xff1a;\u754c\u9762\u7b80\u6d01\u76f4\u89c2&#xff0c;\u5373\u4f7f\u662f\u521d\u5b66\u8005\u4e5f\u80fd\u5feb\u901f\u4e0a\u624b&#xff0c;\u6709\u6548\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002<\/li>\n<li>\u5b9a\u5236\u5316\u5f3a&#xff1a;\u652f\u6301\u591a\u6807\u7b7e\u64cd\u4f5c\u3001\u81ea\u5b9a\u4e49\u5feb\u6377\u952e\u3001\u4e3b\u9898\u7b49&#xff0c;\u53ef\u4ee5\u6839\u636e\u4e2a\u4eba\u559c\u597d\u548c\u9700\u6c42\u8fdb\u884c\u5b9a\u5236\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u6211\u5728\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf&#xff0c;CPU\u67b6\u6784\u662famd64\u67b6\u6784\u7684\u7535\u8111\u4e0a\u5b89\u88c5electerm amd64\u7248\u672c\u53ef\u4ee5\u6b63\u5e38\u8fd0\u884c&#xff0c;\u4f46\u662f\u5728\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf&#xff0c;CPU\u67b6\u6784\u662farm64\u67b6\u6784\u7684\u7535\u8111\u4e0a\u5b89\u88c5electerm\u540e&#xff0c;\u4e0d\u80fd\u8fd0\u884c&#xff0c;\u53ef\u80fd\u8fd8\u6ca1\u6709\u9002\u914d\u6210\u529f&#xff0c;\u6240\u4ee5\u6211\u4f7f\u7528\u4e86\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u81ea\u5e26\u7684OpenSSH\u8fdc\u7a0b\u5de5\u5177&#xff0c;\u867d\u7136\u5728\u7ec8\u7aef\u4e2d\u6267\u884c&#xff0c;\u4f46\u662f\u4e5f\u80fd\u6ee1\u8db3\u81ea\u5df1SSH\u65b9\u5f0f\u767b\u9646\u534e\u4e3a\u4ea4\u6362\u673a\u6216\u670d\u52a1\u5668\u7684\u9700\u6c42\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u9002\u5408\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edfAMD64\u67b6\u6784\u7684SSH\u5de5\u5177&#xff1a;<\/p>\n<h5>\u4e8c\u3001 OpenSSH\u7b80\u4ecb<\/h5>\n<ul>\n<li>\u7b80\u4ecb&#xff1a;OpenSSH\u662f\u6700\u4e3a\u6d41\u884c\u7684SSH\u5de5\u5177\u4e4b\u4e00&#xff0c;\u5b83\u5b8c\u5168\u514d\u8d39\u5f00\u6e90&#xff0c;\u9002\u7528\u4e8eWindows\u3001Linux\u548cMac OS\u7b49\u7cfb\u7edf\u5e73\u53f0\u3002\u5728\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u4e2d&#xff0c;\u4e00\u822cLinux\u64cd\u4f5c\u7cfb\u7edf\u90fd\u81ea\u5e26&#xff0c;\u5982\u679c\u6ca1\u6709\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u5b89\u88c5OpenSSH\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u7aef\u3002<\/li>\n<li>\u5b89\u88c5\u65b9\u6cd5&#xff1a;\n<ul>\n<li>\u5b89\u88c5SSH\u5ba2\u6237\u7aef&#xff1a;sudo apt install openssh-client<\/li>\n<li>\u5b89\u88c5SSH\u670d\u52a1\u7aef&#xff1a;sudo apt  install openssh-server<\/li>\n<\/ul>\n<\/li>\n<li>\u7279\u70b9&#xff1a;\n<ul>\n<li>\u52a0\u5bc6\u901a\u4fe1&#xff1a;\u80fd\u591f\u52a0\u5bc6\u6240\u6709\u901a\u8fc7\u7f51\u7edc\u4f20\u8f93\u7684\u901a\u4fe1\u6d41\u91cf\u548c\u5bc6\u7801&#xff0c;\u9632\u6b62\u8fde\u63a5\u52ab\u6301\u548c\u7a83\u542c&#xff0c;\u786e\u4fdd\u901a\u4fe1\u5b89\u5168\u3002<\/li>\n<li>\u529f\u80fd\u4e30\u5bcc&#xff1a;\u63d0\u4f9b\u4e86\u4e00\u6574\u5957\u5b89\u5168\u96a7\u9053\u529f\u80fd\u3001\u591a\u79cd\u8eab\u4efd\u9a8c\u8bc1\u65b9\u6cd5\u548c\u590d\u6742\u7684\u914d\u7f6e\u9009\u9879\u3002<\/li>\n<li>\u652f\u6301\u591a\u79cd\u534f\u8bae&#xff1a;\u901a\u8fc7\u4f7f\u7528ssh\u3001sftp\u548cscp\u7b49\u5de5\u5177&#xff0c;\u53ef\u4ee5\u6267\u884c\u8fdc\u7a0b\u64cd\u4f5c&#xff0c;\u5982\u8fdc\u7a0b\u767b\u5f55\u3001\u6587\u4ef6\u4f20\u8f93\u7b49\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5>\u4e09\u3001 \u68c0\u67e5\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u662f\u5426\u5b89\u88c5OpenSSH\u5ba2\u6237\u7aef<\/h5>\n<p>\u6253\u5f00\u7ec8\u7aef&#xff0c;\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4&#xff1a;<\/p>\n<p><span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-V<\/span><\/p>\n<p>\u5982\u679c\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86OpenSSH\u5ba2\u6237\u7aef&#xff0c;\u8be5\u547d\u4ee4\u5c06\u663e\u793aOpenSSH\u7684\u7248\u672c\u4fe1\u606f\u3002\u5982\u679c\u6ca1\u6709\u5b89\u88c5&#xff0c;\u7cfb\u7edf\u4f1a\u63d0\u793a\u627e\u4e0d\u5230\u547d\u4ee4\u3002<\/p>\n<h5>\u56db\u3001\u5728Linux\u670d\u52a1\u5668\u68c0\u67e5\u662f\u5426\u5b89\u88c5OpenSSH\u670d\u52a1\u7aef<\/h5>\n<p>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4&#xff1a;<\/p>\n<p>sshd <span class=\"token parameter variable\">-v<\/span><\/p>\n<p>\u5982\u679c\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86OpenSSH\u670d\u52a1\u7aef&#xff0c;\u8be5\u547d\u4ee4\u5c06\u663e\u793asshd\u7684\u7248\u672c\u4fe1\u606f\u3002\u5982\u679c\u6ca1\u6709\u5b89\u88c5&#xff0c;\u7cfb\u7edf\u4f1a\u63d0\u793a\u627e\u4e0d\u5230\u547d\u4ee4\u3002<\/p>\n<hr \/>\n<h5>\u4e94\u3001\u4e0b\u9762\u91cd\u70b9\u4ecb\u7ecd\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528\u81ea\u5e26openssh\u8fdc\u7a0b\u5de5\u5177SSH\u65b9\u5f0f\u767b\u9646\u534e\u4e3a\u4ea4\u6362\u673a\u9047\u5230\u7684\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5<\/h5>\n<h6>1.openssh\u8fdb\u884cssh\u8fdc\u7a0b\u767b\u5f55\u95ee\u9898<\/h6>\n<p>ssh -p 22 root&#064;192.168.x.x<\/p>\n<p>dtt&#064;dtt-pc:~$ <span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-p<\/span> <span class=\"token number\">22<\/span> root&#064;192.168.x.x<br \/>\nUnable to negotiate with <span class=\"token number\">192.168<\/span>.x.x port <span class=\"token number\">22<\/span>: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1<br \/>\n\u6216<br \/>\nUnable to negotiate with <span class=\"token number\">192.168<\/span>.x.x port <span class=\"token number\">22<\/span>: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1<\/p>\n<h6>2.\u4e0b\u9762\u65b9\u6cd5\u6d4b\u8bd5\u662f\u5426\u53ef\u4ee5\u6b63\u5e38ssh&#xff1a;<\/h6>\n<p>ssh -o KexAlgorithms&#061;&#043;diffie-hellman-group1-sha1  -p 22 root&#064;192.168.x.x<\/p>\n<p>\u5982\u679c\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee&#xff0c;\u4e3a\u4e86\u5f7b\u5e95\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u65b9\u6cd5&#xff0c;\u4fee\u6539\/etc\/ssh\/ssh_config\u6587\u4ef6\u3002<\/p>\n<h6>3.\u53ef\u4ee5\u4f7f\u7528vim\u7f16\u8f91\/etc\/ssh\/ssh_config\u6587\u4ef6<\/h6>\n<p>sudo vim \/etc\/ssh\/ssh_config<\/p>\n<p>\u5728\u6700\u4e0b\u9762\u8f93\u5165\u5e76\u4fdd\u5b58\u4ee5\u4e0b\u5185\u5bb9&#xff1a;<\/p>\n<p>KexAlgorithms &#043;diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1<\/p>\n<p>\u4fdd\u5b58\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<h6>4.\u518d\u6b21\u6d4b\u8bd5\u662f\u5426\u53ef\u4ee5\u6b63\u5e38ssh<\/h6>\n<p>\u5982\u679c\u51fa\u73b0\u4e0b\u9762\u95ee\u9898&#xff1a;<\/p>\n<p>dtt&#064;dtt-pc:~$ <span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-p<\/span> <span class=\"token number\">22<\/span> root&#064;192.168.x.x<br \/>\nUnable to negotiate with <span class=\"token number\">192.168<\/span>.x.x port <span class=\"token number\">22<\/span>: no matching cipher found. Their offer: aes128-cbc,3des-cbc,des-cbc<\/p>\n<p>\u53ef\u4ee5\u4f7f\u7528vim\u7f16\u8f91\/etc\/ssh\/ssh_config\u6587\u4ef6&#xff0c;<\/p>\n<p>sudo vim \/etc\/ssh\/ssh_config<\/p>\n<p>\u628a\u4e0b\u9762\u8fd9\u53e5<\/p>\n<p><span class=\"token comment\"># Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc<\/span><\/p>\n<p>\u4e2d\u7684#\u5220\u9664&#xff0c;\u5982\u4e0b&#xff1a;<\/p>\n<p>Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc<\/p>\n<p>\u4fdd\u5b58\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<h6>5.\u518d\u6b21\u6d4b\u8bd5\u662f\u5426\u53ef\u4ee5\u6b63\u5e38ssh<\/h6>\n<p>\u5982\u679c\u51fa\u73b0\u4e0b\u9762\u95ee\u9898&#xff1a;<\/p>\n<p>dtt&#064;dtt-pc:~$ <span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-p<\/span> <span class=\"token number\">22<\/span> root&#064;192.168.x.x<br \/>\nssh_dispatch_run_fatal: Connection to <span class=\"token number\">192.168<\/span>.x.x port <span class=\"token number\">22<\/span>: Invalid key length<\/p>\n<p>\u8fd9\u662f\u56e0\u4e3aOpenSSH\u7248\u672c\u5347\u7ea7\u52307.6\u4e4b\u540e&#xff0c;\u5c0f\u4e8e1024bits\u7684RSA keys\u5df2\u7ecf\u4e0d\u88ab\u652f\u6301\u4e86\u3002<br \/>\n\u89e3\u51b3\u65b9\u6cd5&#xff1a;\u4f7f\u7528\u80fd\u591f\u6b63\u5e38ssh\u8bbf\u95ee\u4ea4\u6362\u673a\u4e0a\u6216\u670d\u52a1\u5668\u4e0a\u7684Windows\u7cfb\u7edf\u7535\u8111\u4e0a&#xff0c;\u5728\u9700\u8981ssh\u767b\u5f55\u7684\u4ea4\u6362\u673a\u4e0a\u6216\u670d\u52a1\u5668\u4e0a\u5347\u7ea7RSA keys\u5b57\u8282\u6570\u3002<\/p>\n<p>rsa local-key-pair create<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729175113-68890a117964a.webp\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u91cd\u65b0\u751f\u6210&#xff0c;\u81ea\u5b9a\u4e49RSA keys\u5b57\u8282\u6570\u5927\u4e8e1024&#xff0c;2048\u5373\u53ef\u3002\u6700\u540e\u4fdd\u5b58\u914d\u7f6e\u3002<\/p>\n<h6>6.\u518d\u6b21\u6d4b\u8bd5\u662f\u5426\u53ef\u4ee5\u6b63\u5e38ssh<\/h6>\n<p>ssh -p 22 root&#064;192.168.x.x&#xff0c;\u5982\u679c\u603b\u662f\u63d0\u793a\u54cd\u5e94\u8d85\u65f6&#xff0c;\u4f46\u662f\u5728Windows\u7cfb\u7edf\u4e0a\u8bbf\u95ee\u4e00\u5207\u6b63\u5e38&#xff0c;\u8fd9\u53ef\u80fd\u9700\u8981\u4ea4\u6362\u673a\u52a0\u8f7d\u5f31\u7b97\u6cd5\u3002<\/p>\n<p>\u534e\u4e3a\u4ea4\u6362\u673a\u52a0\u8f7d\u5f31\u7b97\u6cd5\u64cd\u4f5c\u6b65\u9aa4&#xff0c;\u9700\u8981\u628a\u5f31\u7b97\u6cd5\u547d\u4ee4\u9010\u6761\u914d\u7f6e\u4e0a\u53bb\u3002<br \/>\n\u9996\u5148\u5728\u534e\u4e3a\u4ea4\u6362\u673a\u4e0a\u6267\u884c\u4e0b\u9762\u547d\u4ee4&#xff1a;<\/p>\n<p><span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> undo <span class=\"token function\">ssh<\/span> server hmac<\/p>\n<p><span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> undo <span class=\"token function\">ssh<\/span> server publickey<\/p>\n<p><span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> undo <span class=\"token function\">ssh<\/span> server key-exchange<\/p>\n<p>undo\u547d\u4ee4\u53ea\u662f\u8ba9\u7b97\u6cd5\u56de\u5f52\u9ed8\u8ba4\u503c\u3002<\/p>\n<p>\u914d\u7f6e\u5b8c\u6574\u5f31\u52a0\u5bc6\u7b97\u6cd5\u9700\u8981\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4&#xff0c;<\/p>\n<p><span class=\"token operator\">&lt;<\/span>HUAWEI<span class=\"token operator\">&gt;<\/span> <span class=\"token function\">install<\/span> feature-software WEAKEA<\/p>\n<p><span class=\"token operator\">&lt;<\/span>HUAWEI<span class=\"token operator\">&gt;<\/span> system-view<\/p>\n<p><span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> <span class=\"token function\">ssh<\/span> server cipher aes256_gcm aes128_gcm aes256_ctr aes192_ctr aes128_ctr aes256_cbc aes192_cbc aes128_cbc arcfour256 arcfour128 3des_cbc blowfish_cbc des_cbc sm4_cbc<\/p>\n<p><span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> <span class=\"token function\">ssh<\/span> server hmac sha2_512 sha2_256_96 sha2_256 sha1 sha1_96 md5 md5_96 sm3<\/p>\n<p><span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> <span class=\"token function\">ssh<\/span> server key-exchange dh_group_exchange_sha256 dh_group_exchange_sha1 dh_group14_sha1 dh_group1_sha1 ecdh_sha2_nistp256 ecdh_sha2_nistp384 ecdh_sha2_nistp521 sm2_kep dh_group16_sha512 curve25519_sha256<\/p>\n<p><span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> <span class=\"token function\">ssh<\/span> server publickey dsa ecc rsa x509v3-ssh-rsa rsa_sha2_256 rsa_sha2_512<\/p>\n<p><span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> <span class=\"token function\">ssh<\/span> server dh-exchange min-len <span class=\"token number\">1024<\/span><\/p>\n<p><span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> <span class=\"token function\">ssh<\/span> server-source all-interface<\/p>\n<p>\u4e0a\u9762\u5f31\u52a0\u5bc6\u7b97\u6cd5\u6bd4\u8f83\u591a&#xff0c;\u6839\u636e\u4ea4\u6362\u673a\u81ea\u8eab\u578b\u53f7\u51b3\u5b9a&#xff0c;\u6253\u4e2a&#xff1f;&#xff0c;\u770b\u4e0b\u4ea4\u6362\u673a\u652f\u6301\u54ea\u4e9b\u5f31\u52a0\u5bc6\u7b97\u6cd5\u3002<\/p>\n<p><span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> <span class=\"token function\">ssh<\/span> server cipher &#xff1f;<\/p>\n<p><span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> <span class=\"token function\">ssh<\/span> server cipher &#xff1f;<br \/>\n<span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> <span class=\"token function\">ssh<\/span> server hmac &#xff1f;<br \/>\n<span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> <span class=\"token function\">ssh<\/span> server key-exchange &#xff1f;<br \/>\n<span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> <span class=\"token function\">ssh<\/span> server publickey &#xff1f;<br \/>\n<span class=\"token punctuation\">[<\/span>HUAWEI<span class=\"token punctuation\">]<\/span> <span class=\"token function\">ssh<\/span> server dh-exchange &#xff1f;<\/p>\n<h6>7.\u518d\u6b21\u6d4b\u8bd5\u662f\u5426\u53ef\u4ee5\u6b63\u5e38ssh<\/h6>\n<p>ssh -p 22 root&#064;192.168.x.x<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729175113-68890a1185795.webp\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5982\u679c\u8fd8\u6709\u5176\u4ed6\u95ee\u9898&#xff0c;\u8bf7\u8054\u7cfb\u534e\u4e3a\u4ea4\u6362\u673a\u5b98\u7f51\u5ba2\u670d\u7535\u8bdd\u54a8\u8be2\u3002<\/p>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e24\u6b21\uff0c\u6536\u85cf11\u6b21\u3002\u7b80\u4ecb\uff1aelecterm\u662f\u4e00\u6b3e\u5f00\u6e90\u514d\u8d39\u7684SSH\u5de5\u5177\uff0c\u5177\u6709\u826f\u597d\u7684\u8de8\u5e73\u53f0\u517c\u5bb9\u6027\uff0c\u9002\u7528\u4e8eWindows\u3001macOS\u3001Linux\u4ee5\u53ca\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u3002\u7279\u70b9\u5f00\u6e90\u514d\u8d39\uff1a\u7528\u6237\u53ef\u4ee5\u5728GitHub\u4e0a\u627e\u5230\u5b83\u7684\u6e90\u4ee3\u7801\uff0c\u81ea\u7531\u5730\u4e0b\u8f7d\u548c\u4f7f\u7528\uff0c\u65e0\u9700\u62c5\u5fc3\u7248\u6743\u548c\u8bb8\u53ef\u95ee\u9898\u3002\u529f\u80fd\u5168\u9762\uff1a\u4e0d\u4ec5\u652f\u6301SSH\u8fde\u63a5\uff0c\u8fd8\u652f\u6301FTP\/SFTP\u6587\u4ef6\u4f20\u8f93\uff0c\u65b9\u4fbf\u7528\u6237\u8fdb\u884c\u6587\u4ef6\u7ba1\u7406\u3002\u7528\u6237\u754c\u9762\u53cb\u597d\uff1a\u754c\u9762\u7b80\u6d01\u76f4\u89c2\uff0c\u5373\u4f7f\u662f\u521d\u5b66\u8005\u4e5f\u80fd\u5feb\u901f\u4e0a\u624b\uff0c\u6709\u6548\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002\u5b9a\u5236\u5316\u5f3a\uff1a\u652f\u6301\u591a\u6807\u7b7e\u64cd\u4f5c\u3001\u81ea\u5b9a\u4e49\u5feb\u6377\u952e\u3001\u4e3b\u9898\u7b49\uff0c\u53ef\u4ee5\u6839\u636e\u4e2a\u4eba\u559c\u597d\u548c\u9700\u6c42\u8fdb\u884c\u5b9a\u5236\u3002_\u9e92\u9e9f\u7cfb\u7edf\u7684\u8fdc\u7a0b\u5de5\u5177\u6709\u54ea\u4e9b<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,1300,2362,77,896,18,43,4377,981],"topic":[],"class_list":{"0":"post-45920","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-server","7":"tag-linux","9":"tag-openssh","10":"tag-ssh","11":"tag-896","12":"tag-18","13":"tag-43","14":"tag-4377","15":"tag-981"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528\u81ea\u5e26openssh\u8fdc\u7a0b\u5de5\u5177SSH\u65b9\u5f0f\u767b\u9646\u534e\u4e3a\u4ea4\u6362\u673a\u6216\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/45920.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528\u81ea\u5e26openssh\u8fdc\u7a0b\u5de5\u5177SSH\u65b9\u5f0f\u767b\u9646\u534e\u4e3a\u4ea4\u6362\u673a\u6216\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e24\u6b21\uff0c\u6536\u85cf11\u6b21\u3002\u7b80\u4ecb\uff1aelecterm\u662f\u4e00\u6b3e\u5f00\u6e90\u514d\u8d39\u7684SSH\u5de5\u5177\uff0c\u5177\u6709\u826f\u597d\u7684\u8de8\u5e73\u53f0\u517c\u5bb9\u6027\uff0c\u9002\u7528\u4e8eWindows\u3001macOS\u3001Linux\u4ee5\u53ca\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u3002\u7279\u70b9\u5f00\u6e90\u514d\u8d39\uff1a\u7528\u6237\u53ef\u4ee5\u5728GitHub\u4e0a\u627e\u5230\u5b83\u7684\u6e90\u4ee3\u7801\uff0c\u81ea\u7531\u5730\u4e0b\u8f7d\u548c\u4f7f\u7528\uff0c\u65e0\u9700\u62c5\u5fc3\u7248\u6743\u548c\u8bb8\u53ef\u95ee\u9898\u3002\u529f\u80fd\u5168\u9762\uff1a\u4e0d\u4ec5\u652f\u6301SSH\u8fde\u63a5\uff0c\u8fd8\u652f\u6301FTP\/SFTP\u6587\u4ef6\u4f20\u8f93\uff0c\u65b9\u4fbf\u7528\u6237\u8fdb\u884c\u6587\u4ef6\u7ba1\u7406\u3002\u7528\u6237\u754c\u9762\u53cb\u597d\uff1a\u754c\u9762\u7b80\u6d01\u76f4\u89c2\uff0c\u5373\u4f7f\u662f\u521d\u5b66\u8005\u4e5f\u80fd\u5feb\u901f\u4e0a\u624b\uff0c\u6709\u6548\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002\u5b9a\u5236\u5316\u5f3a\uff1a\u652f\u6301\u591a\u6807\u7b7e\u64cd\u4f5c\u3001\u81ea\u5b9a\u4e49\u5feb\u6377\u952e\u3001\u4e3b\u9898\u7b49\uff0c\u53ef\u4ee5\u6839\u636e\u4e2a\u4eba\u559c\u597d\u548c\u9700\u6c42\u8fdb\u884c\u5b9a\u5236\u3002_\u9e92\u9e9f\u7cfb\u7edf\u7684\u8fdc\u7a0b\u5de5\u5177\u6709\u54ea\u4e9b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/45920.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-29T17:51:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729175113-68890a117964a.webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/45920.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/45920.html\",\"name\":\"\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528\u81ea\u5e26openssh\u8fdc\u7a0b\u5de5\u5177SSH\u65b9\u5f0f\u767b\u9646\u534e\u4e3a\u4ea4\u6362\u673a\u6216\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-07-29T17:51:14+00:00\",\"dateModified\":\"2025-07-29T17:51:14+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/45920.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/45920.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/45920.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528\u81ea\u5e26openssh\u8fdc\u7a0b\u5de5\u5177SSH\u65b9\u5f0f\u767b\u9646\u534e\u4e3a\u4ea4\u6362\u673a\u6216\u670d\u52a1\u5668\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528\u81ea\u5e26openssh\u8fdc\u7a0b\u5de5\u5177SSH\u65b9\u5f0f\u767b\u9646\u534e\u4e3a\u4ea4\u6362\u673a\u6216\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/45920.html","og_locale":"zh_CN","og_type":"article","og_title":"\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528\u81ea\u5e26openssh\u8fdc\u7a0b\u5de5\u5177SSH\u65b9\u5f0f\u767b\u9646\u534e\u4e3a\u4ea4\u6362\u673a\u6216\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e24\u6b21\uff0c\u6536\u85cf11\u6b21\u3002\u7b80\u4ecb\uff1aelecterm\u662f\u4e00\u6b3e\u5f00\u6e90\u514d\u8d39\u7684SSH\u5de5\u5177\uff0c\u5177\u6709\u826f\u597d\u7684\u8de8\u5e73\u53f0\u517c\u5bb9\u6027\uff0c\u9002\u7528\u4e8eWindows\u3001macOS\u3001Linux\u4ee5\u53ca\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u3002\u7279\u70b9\u5f00\u6e90\u514d\u8d39\uff1a\u7528\u6237\u53ef\u4ee5\u5728GitHub\u4e0a\u627e\u5230\u5b83\u7684\u6e90\u4ee3\u7801\uff0c\u81ea\u7531\u5730\u4e0b\u8f7d\u548c\u4f7f\u7528\uff0c\u65e0\u9700\u62c5\u5fc3\u7248\u6743\u548c\u8bb8\u53ef\u95ee\u9898\u3002\u529f\u80fd\u5168\u9762\uff1a\u4e0d\u4ec5\u652f\u6301SSH\u8fde\u63a5\uff0c\u8fd8\u652f\u6301FTP\/SFTP\u6587\u4ef6\u4f20\u8f93\uff0c\u65b9\u4fbf\u7528\u6237\u8fdb\u884c\u6587\u4ef6\u7ba1\u7406\u3002\u7528\u6237\u754c\u9762\u53cb\u597d\uff1a\u754c\u9762\u7b80\u6d01\u76f4\u89c2\uff0c\u5373\u4f7f\u662f\u521d\u5b66\u8005\u4e5f\u80fd\u5feb\u901f\u4e0a\u624b\uff0c\u6709\u6548\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002\u5b9a\u5236\u5316\u5f3a\uff1a\u652f\u6301\u591a\u6807\u7b7e\u64cd\u4f5c\u3001\u81ea\u5b9a\u4e49\u5feb\u6377\u952e\u3001\u4e3b\u9898\u7b49\uff0c\u53ef\u4ee5\u6839\u636e\u4e2a\u4eba\u559c\u597d\u548c\u9700\u6c42\u8fdb\u884c\u5b9a\u5236\u3002_\u9e92\u9e9f\u7cfb\u7edf\u7684\u8fdc\u7a0b\u5de5\u5177\u6709\u54ea\u4e9b","og_url":"https:\/\/www.wsisp.com\/helps\/45920.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-07-29T17:51:14+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250729175113-68890a117964a.webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/45920.html","url":"https:\/\/www.wsisp.com\/helps\/45920.html","name":"\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528\u81ea\u5e26openssh\u8fdc\u7a0b\u5de5\u5177SSH\u65b9\u5f0f\u767b\u9646\u534e\u4e3a\u4ea4\u6362\u673a\u6216\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-07-29T17:51:14+00:00","dateModified":"2025-07-29T17:51:14+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/45920.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/45920.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/45920.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u56fd\u4ea7Linux\u94f6\u6cb3\u9e92\u9e9f\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528\u81ea\u5e26openssh\u8fdc\u7a0b\u5de5\u5177SSH\u65b9\u5f0f\u767b\u9646\u534e\u4e3a\u4ea4\u6362\u673a\u6216\u670d\u52a1\u5668"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/45920","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=45920"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/45920\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=45920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=45920"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=45920"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=45920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}