{"id":91600,"date":"2026-08-08T07:09:36","date_gmt":"2026-08-07T23:09:36","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/91600.html"},"modified":"2026-08-08T07:09:36","modified_gmt":"2026-08-07T23:09:36","slug":"linux%e5%91%bd%e4%bb%a4-ssh%ef%bc%88ssh-%e8%bf%9c%e7%a8%8b%e7%99%bb%e5%bd%95%e5%b7%a5%e5%85%b7%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/91600.html","title":{"rendered":"Linux\u547d\u4ee4-ssh\uff08SSH \u8fdc\u7a0b\u767b\u5f55\u5de5\u5177\uff09"},"content":{"rendered":"<\/p>\n<h4>Linux\u547d\u4ee4-ssh&#xff08;SSH \u8fdc\u7a0b\u767b\u5f55\u5de5\u5177&#xff09;<\/h4>\n<ul>\n<li>\n<ul>\n<li>\u5feb\u901f\u53c2\u8003<\/li>\n<li>\u57fa\u672c\u8fde\u63a5<\/li>\n<li>SSH \u914d\u7f6e\u6587\u4ef6<\/li>\n<li>\u7aef\u53e3\u8f6c\u53d1&#xff08;SSH \u96a7\u9053&#xff09;<\/li>\n<li>\u6587\u4ef6\u4f20\u8f93\u76f8\u5173<\/li>\n<li>X11 \u8f6c\u53d1\u4e0e\u56fe\u5f62<\/li>\n<li>SSH \u9009\u9879\u901f\u67e5<\/li>\n<li>\u5e38\u7528\u7ec4\u5408<\/li>\n<li>\u5b89\u5168\u6700\u4f73\u5b9e\u8df5<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>ssh&#xff08;Secure Shell&#xff09;\u662f Linux\/Unix \u4e16\u754c\u4e2d\u6700\u6838\u5fc3\u7684\u8fdc\u7a0b\u7ba1\u7406\u5de5\u5177&#xff0c;\u7528\u4e8e\u5b89\u5168\u5730\u767b\u5f55\u8fdc\u7a0b\u4e3b\u673a\u5e76\u6267\u884c\u547d\u4ee4\u3002\u5b83\u901a\u8fc7\u52a0\u5bc6\u96a7\u9053\u4f20\u8f93\u6240\u6709\u6570\u636e&#xff0c;\u66ff\u4ee3\u4e86\u4e0d\u5b89\u5168\u7684 telnet \u548c rlogin&#xff0c;\u662f\u73b0\u4ee3\u7cfb\u7edf\u7ba1\u7406\u548c\u8fd0\u7ef4\u7684\u57fa\u7840\u8bbe\u65bd\u7ea7\u5de5\u5177\u3002<\/p>\n<h3>\u5feb\u901f\u53c2\u8003<\/h3>\n<p><span class=\"token function\">ssh<\/span> <span class=\"token punctuation\">[<\/span>\u9009\u9879<span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">[<\/span>\u7528\u6237&#064;<span class=\"token punctuation\">]<\/span>\u4e3b\u673a <span class=\"token punctuation\">[<\/span>\u547d\u4ee4<span class=\"token punctuation\">]<\/span><\/p>\n<p>ssh \u9ed8\u8ba4\u4f7f\u7528 TCP 22 \u7aef\u53e3\u5efa\u7acb\u52a0\u5bc6\u8fde\u63a5\u3002\u9996\u6b21\u8fde\u63a5\u4f1a\u63d0\u793a\u9a8c\u8bc1\u4e3b\u673a\u6307\u7eb9&#xff0c;\u786e\u8ba4\u540e\u5b58\u5165 ~\/.ssh\/known_hosts\u3002<\/p>\n<h3>\u57fa\u672c\u8fde\u63a5<\/h3>\n<p><span class=\"token comment\"># \u4f7f\u7528\u5f53\u524d\u7528\u6237\u540d\u8fde\u63a5<\/span><br \/>\n<span class=\"token function\">ssh<\/span> remote_host<\/p>\n<p><span class=\"token comment\"># \u6307\u5b9a\u7528\u6237\u540d\u8fde\u63a5<\/span><br \/>\n<span class=\"token function\">ssh<\/span> admin&#064;remote_host<\/p>\n<p><span class=\"token comment\"># \u6307\u5b9a\u7aef\u53e3<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-p<\/span> <span class=\"token number\">2222<\/span> user&#064;remote_host<\/p>\n<p><span class=\"token comment\"># \u4f7f\u7528\u6307\u5b9a\u5bc6\u94a5\u8fde\u63a5<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-i<\/span> ~\/.ssh\/custom_key user&#064;remote_host<\/p>\n<p><span class=\"token comment\"># \u6267\u884c\u5355\u6761\u547d\u4ee4\u540e\u9000\u51fa&#xff08;\u975e\u4ea4\u4e92\u6a21\u5f0f&#xff09;<\/span><br \/>\n<span class=\"token function\">ssh<\/span> user&#064;remote_host <span class=\"token string\">&#034;df -h&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u6267\u884c\u591a\u6761\u547d\u4ee4<\/span><br \/>\n<span class=\"token function\">ssh<\/span> user&#064;remote_host <span class=\"token string\">&#034;cd \/var\/log &amp;&amp; ls -la &amp;&amp; tail -n 5 syslog&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u6267\u884c\u672c\u5730\u811a\u672c<\/span><br \/>\n<span class=\"token function\">ssh<\/span> user&#064;remote_host <span class=\"token string\">&#039;bash -s&#039;<\/span> <span class=\"token operator\">&lt;<\/span> local_script.sh<\/p>\n<p><span class=\"token comment\"># \u538b\u7f29\u4f20\u8f93&#xff08;\u4f4e\u901f\u7f51\u7edc\u4e0b\u52a0\u901f&#xff09;<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-C<\/span> user&#064;remote_host<\/p>\n<h3>SSH \u914d\u7f6e\u6587\u4ef6<\/h3>\n<p>~\/.ssh\/config \u53ef\u4ee5\u7b80\u5316\u8fde\u63a5\u53c2\u6570&#xff1a;<\/p>\n<p><span class=\"token function\">cat<\/span> <span class=\"token operator\">&gt;<\/span> ~\/.ssh\/config <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#039;EOF&#039;<br \/>\n# \u901a\u7528\u9ed8\u8ba4\u914d\u7f6e<br \/>\nHost *<br \/>\n    ServerAliveInterval 60<br \/>\n    ServerAliveCountMax 3<br \/>\n    StrictHostKeyChecking ask<br \/>\n    ForwardAgent no<\/p>\n<p># \u751f\u4ea7\u670d\u52a1\u5668\u522b\u540d<br \/>\nHost prod-web<br \/>\n    HostName 203.0.113.10<br \/>\n    User deploy<br \/>\n    Port 2222<br \/>\n    IdentityFile ~\/.ssh\/prod_ed25519<\/p>\n<p># \u8df3\u677f\u673a\u540e\u7684\u5185\u7f51\u4e3b\u673a<br \/>\nHost internal-db<br \/>\n    HostName 10.0.1.50<br \/>\n    User admin<br \/>\n    ProxyJump prod-web<\/p>\n<p># GitHub<br \/>\nHost github.com<br \/>\n    HostName github.com<br \/>\n    User git<br \/>\n    IdentityFile ~\/.ssh\/id_ed25519_github<br \/>\n    IdentitiesOnly yes<br \/>\nEOF<\/span><\/p>\n<p><span class=\"token function\">chmod<\/span> <span class=\"token number\">600<\/span> ~\/.ssh\/config<\/p>\n<p><span class=\"token comment\"># \u4f7f\u7528\u522b\u540d\u8fde\u63a5<\/span><br \/>\n<span class=\"token function\">ssh<\/span> prod-web    <span class=\"token comment\"># \u76f8\u5f53\u4e8e ssh -p 2222 -i ~\/.ssh\/prod_ed25519 deploy&#064;203.0.113.10<\/span><br \/>\n<span class=\"token function\">ssh<\/span> internal-db <span class=\"token comment\"># \u81ea\u52a8\u901a\u8fc7\u8df3\u677f\u673a\u8fde\u63a5<\/span><\/p>\n<h3>\u7aef\u53e3\u8f6c\u53d1&#xff08;SSH \u96a7\u9053&#xff09;<\/h3>\n<p><span class=\"token comment\"># &#061;&#061;&#061; \u672c\u5730\u7aef\u53e3\u8f6c\u53d1 (-L) &#061;&#061;&#061;<\/span><br \/>\n<span class=\"token comment\"># \u683c\u5f0f: ssh -L [\u672c\u5730\u5730\u5740:]\u672c\u5730\u7aef\u53e3:\u76ee\u6807\u4e3b\u673a:\u76ee\u6807\u7aef\u53e3 user&#064;ssh_server<\/span><\/p>\n<p><span class=\"token comment\"># \u5c06\u672c\u5730 8080 \u8f6c\u53d1\u5230\u8fdc\u7a0b\u7684 localhost:80<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-L<\/span> <span class=\"token number\">8080<\/span>:localhost:80 user&#064;remote_host<br \/>\n<span class=\"token comment\"># \u672c\u5730\u8bbf\u95ee http:\/\/localhost:8080 \u76f8\u5f53\u4e8e\u8fdc\u7a0b http:\/\/localhost:80<\/span><\/p>\n<p><span class=\"token comment\"># \u901a\u8fc7\u8df3\u677f\u673a\u8bbf\u95ee\u5185\u7f51\u6570\u636e\u5e93<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-L<\/span> <span class=\"token number\">3306<\/span>:internal_db:3306 user&#064;jumphost<br \/>\n<span class=\"token comment\"># \u672c\u5730 mysql -h 127.0.0.1 -P 3306 \u5373\u53ef\u8fde\u63a5\u5185\u7f51\u6570\u636e\u5e93<\/span><\/p>\n<p><span class=\"token comment\"># \u7ed1\u5b9a\u5230\u7279\u5b9a\u672c\u5730\u5730\u5740<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-L<\/span> <span class=\"token number\">127.0<\/span>.0.1:8080:localhost:80 user&#064;host<\/p>\n<p><span class=\"token comment\"># &#061;&#061;&#061; \u8fdc\u7a0b\u7aef\u53e3\u8f6c\u53d1 (-R) &#061;&#061;&#061;<\/span><br \/>\n<span class=\"token comment\"># \u683c\u5f0f: ssh -R [\u8fdc\u7a0b\u5730\u5740:]\u8fdc\u7a0b\u7aef\u53e3:\u76ee\u6807\u4e3b\u673a:\u76ee\u6807\u7aef\u53e3 user&#064;ssh_server<\/span><\/p>\n<p><span class=\"token comment\"># \u5c06\u8fdc\u7a0b 9090 \u8f6c\u53d1\u5230\u672c\u5730 localhost:3000<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-R<\/span> <span class=\"token number\">9090<\/span>:localhost:3000 user&#064;remote_host<br \/>\n<span class=\"token comment\"># \u8fdc\u7a0b\u4e3b\u673a\u4e0a\u8bbf\u95ee localhost:9090 \u4f1a\u8f6c\u53d1\u5230\u672c\u5730\u7684 3000 \u7aef\u53e3<\/span><\/p>\n<p><span class=\"token comment\"># \u66b4\u9732\u672c\u5730\u5f00\u53d1\u670d\u52a1\u5668\u5230\u516c\u7f51<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-R<\/span> <span class=\"token number\">8080<\/span>:localhost:80 serveo.net<\/p>\n<p><span class=\"token comment\"># &#061;&#061;&#061; SOCKS \u4ee3\u7406 (-D) &#061;&#061;&#061;<\/span><br \/>\n<span class=\"token comment\"># \u5728\u672c\u5730\u542f\u52a8 SOCKS5 \u4ee3\u7406<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-D<\/span> <span class=\"token number\">1080<\/span> user&#064;remote_host<br \/>\n<span class=\"token comment\"># \u914d\u7f6e\u6d4f\u89c8\u5668 SOCKS \u4ee3\u7406\u4e3a localhost:1080<\/span><\/p>\n<p><span class=\"token comment\"># \u914d\u5408\u7a0b\u5e8f\u4f7f\u7528<\/span><br \/>\n<span class=\"token function\">curl<\/span> <span class=\"token parameter variable\">&#8211;socks5<\/span> localhost:1080 https:\/\/example.com<\/p>\n<p><span class=\"token comment\"># &#061;&#061;&#061; \u52a8\u6001\u7aef\u53e3\u8f6c\u53d1 &#061;&#061;&#061;<\/span><br \/>\n<span class=\"token comment\"># \u591a\u7aef\u53e3\u4e00\u6b21\u6027\u8f6c\u53d1<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-L<\/span> <span class=\"token number\">8080<\/span>:localhost:80 <span class=\"token parameter variable\">-L<\/span> <span class=\"token number\">8443<\/span>:localhost:443 user&#064;host<\/p>\n<h3>\u6587\u4ef6\u4f20\u8f93\u76f8\u5173<\/h3>\n<p><span class=\"token comment\"># \u4ece\u672c\u5730\u4f20\u6587\u4ef6\u5230\u8fdc\u7a0b<\/span><br \/>\n<span class=\"token function\">scp<\/span> localfile.txt user&#064;host:\/path\/to\/destination\/<\/p>\n<p><span class=\"token comment\"># \u4ece\u8fdc\u7a0b\u4e0b\u8f7d\u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">scp<\/span> user&#064;host:\/path\/to\/file.txt .\/localfile.txt<\/p>\n<p><span class=\"token comment\"># \u4f20\u8f93\u76ee\u5f55&#xff08;\u9012\u5f52&#xff09;<\/span><br \/>\n<span class=\"token function\">scp<\/span> <span class=\"token parameter variable\">-r<\/span> .\/project\/ user&#064;host:\/opt\/<\/p>\n<p><span class=\"token comment\"># rsync \u540c\u6b65\u76ee\u5f55&#xff08;\u9ad8\u6548\u589e\u91cf&#xff09;<\/span><br \/>\n<span class=\"token function\">rsync<\/span> <span class=\"token parameter variable\">-avz<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token function\">ssh<\/span> .\/local_dir\/ user&#064;host:\/remote_dir\/<\/p>\n<p><span class=\"token comment\"># \u901a\u8fc7\u7ba1\u9053\u4f20\u8f93\u6570\u636e<\/span><br \/>\n<span class=\"token function\">tar<\/span> czf &#8211; \/var\/log <span class=\"token operator\">|<\/span> <span class=\"token function\">ssh<\/span> user&#064;host <span class=\"token string\">&#034;tar xzf &#8211; -C \/backup\/&#034;<\/span><\/p>\n<p><span class=\"token comment\"># SFTP \u6a21\u5f0f<\/span><br \/>\n<span class=\"token function\">sftp<\/span> user&#064;host<\/p>\n<h3>X11 \u8f6c\u53d1\u4e0e\u56fe\u5f62<\/h3>\n<p><span class=\"token comment\"># \u542f\u7528 X11 \u8f6c\u53d1&#xff08;\u8fdc\u7a0b GUI \u5e94\u7528\u663e\u793a\u5728\u672c\u5730&#xff09;<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-X<\/span> user&#064;remote_host<br \/>\n<span class=\"token comment\"># \u767b\u5f55\u540e\u8fd0\u884c\u56fe\u5f62\u7a0b\u5e8f&#xff1a;<\/span><br \/>\nfirefox <span class=\"token operator\">&amp;<\/span><br \/>\nxclock <span class=\"token operator\">&amp;<\/span><br \/>\ngedit <span class=\"token operator\">&amp;<\/span><\/p>\n<p><span class=\"token comment\"># \u53ef\u4fe1 X11 \u8f6c\u53d1&#xff08;\u6027\u80fd\u66f4\u597d&#xff0c;\u4f46\u5b89\u5168\u6027\u7565\u4f4e&#xff09;<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-Y<\/span> user&#064;remote_host<\/p>\n<h3>SSH \u9009\u9879\u901f\u67e5<\/h3>\n<table>\n<tr>\u9009\u9879\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>-p PORT<\/td>\n<td>\u6307\u5b9a SSH \u7aef\u53e3<\/td>\n<\/tr>\n<tr>\n<td>-i KEYFILE<\/td>\n<td>\u6307\u5b9a\u79c1\u94a5\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td>-v \/ -vv \/ -vvv<\/td>\n<td>\u8c03\u8bd5\u8f93\u51fa&#xff08;\u9010\u7ea7\u8be6\u7ec6&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>-L<\/td>\n<td>\u672c\u5730\u7aef\u53e3\u8f6c\u53d1<\/td>\n<\/tr>\n<tr>\n<td>-R<\/td>\n<td>\u8fdc\u7a0b\u7aef\u53e3\u8f6c\u53d1<\/td>\n<\/tr>\n<tr>\n<td>-D<\/td>\n<td>SOCKS \u4ee3\u7406<\/td>\n<\/tr>\n<tr>\n<td>-N<\/td>\n<td>\u4e0d\u6267\u884c\u8fdc\u7a0b\u547d\u4ee4&#xff08;\u4ec5\u8f6c\u53d1&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>-f<\/td>\n<td>\u540e\u53f0\u8fd0\u884c<\/td>\n<\/tr>\n<tr>\n<td>-T<\/td>\n<td>\u7981\u7528\u4f2a\u7ec8\u7aef\u5206\u914d<\/td>\n<\/tr>\n<tr>\n<td>-C<\/td>\n<td>\u538b\u7f29\u6570\u636e\u4f20\u8f93<\/td>\n<\/tr>\n<tr>\n<td>-A<\/td>\n<td>\u542f\u7528 SSH Agent \u8f6c\u53d1<\/td>\n<\/tr>\n<tr>\n<td>-X \/ -Y<\/td>\n<td>X11 \u8f6c\u53d1<\/td>\n<\/tr>\n<tr>\n<td>-4 \/ -6<\/td>\n<td>\u4ec5\u4f7f\u7528 IPv4\/IPv6<\/td>\n<\/tr>\n<tr>\n<td>-o OPTION<\/td>\n<td>\u4f20\u9012\u914d\u7f6e\u9009\u9879<\/td>\n<\/tr>\n<tr>\n<td>-q<\/td>\n<td>\u9759\u9ed8\u6a21\u5f0f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5e38\u7528\u7ec4\u5408<\/h3>\n<p><span class=\"token comment\"># \u540e\u53f0\u5efa\u7acb\u6301\u4e45\u96a7\u9053<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-fNT<\/span> <span class=\"token parameter variable\">-L<\/span> <span class=\"token number\">3306<\/span>:db.internal:3306 user&#064;jumphost<\/p>\n<p><span class=\"token comment\"># \u8c03\u8bd5\u8fde\u63a5\u95ee\u9898<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-vvv<\/span> user&#064;problematic_host<\/p>\n<p><span class=\"token comment\"># \u8df3\u8fc7\u591a\u91cd\u8df3\u677f<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-J<\/span> user&#064;hop1,user&#064;hop2 user&#064;final_target<\/p>\n<p><span class=\"token comment\"># \u4ec5\u6d4b\u8bd5\u8ba4\u8bc1\u4e0d\u6267\u884c\u547d\u4ee4<\/span><br \/>\n<span class=\"token function\">ssh<\/span> <span class=\"token parameter variable\">-o<\/span> <span class=\"token assign-left variable\">ConnectTimeout<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">5<\/span> user&#064;host <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;OK&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u8fde\u63a5\u5e76\u81ea\u52a8\u9000\u51fa&#xff08;\u8d85\u65f6\u63a7\u5236&#xff09;<\/span><br \/>\n<span class=\"token function\">timeout<\/span> <span class=\"token number\">10<\/span> <span class=\"token function\">ssh<\/span> user&#064;host <span class=\"token operator\">||<\/span> <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;\u8fde\u63a5\u8d85\u65f6&#034;<\/span><\/p>\n<h3>\u5b89\u5168\u6700\u4f73\u5b9e\u8df5<\/h3>\n<p>\u5b89\u5168\u51c6\u5219&#xff1a;<\/p>\n<li>\u4f7f\u7528 Ed25519 \u5bc6\u94a5&#xff0c;\u7981\u7528 DSA<\/li>\n<li>\u914d\u7f6e ~\/.ssh\/config \u800c\u975e\u6bcf\u6b21\u6307\u5b9a\u9009\u9879<\/li>\n<li>\u9650\u5236 StrictHostKeyChecking \u4e3a yes \u6216 accept-new<\/li>\n<li>\u4f7f\u7528 IdentitiesOnly yes \u9632\u6b62 agent \u53d1\u9001\u8fc7\u591a\u5bc6\u94a5<\/li>\n<li>\u751f\u4ea7\u73af\u5883\u7981\u7528\u5bc6\u7801\u767b\u5f55&#xff0c;\u4ec5\u7528\u5bc6\u94a5\u8ba4\u8bc1<\/li>\n<p><span class=\"token comment\"># \u5b89\u5168\u7684 SSH Config \u6a21\u677f<\/span><br \/>\n<span class=\"token function\">cat<\/span> <span class=\"token operator\">&gt;&gt;<\/span> ~\/.ssh\/config <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#039;EOF&#039;<br \/>\nHost *<br \/>\n    ServerAliveInterval 60<br \/>\n    ServerAliveCountMax 3<br \/>\n    HashKnownHosts yes<br \/>\n    IdentitiesOnly yes<br \/>\n    PreferredAuthentications publickey<br \/>\n    PasswordAuthentication no<\/p>\n<p>Host production<br \/>\n    HostName prod.example.com<br \/>\n    User deploy<br \/>\n    IdentityFile ~\/.ssh\/prod_ed25519<br \/>\n    Port 2222<br \/>\n    ForwardAgent no<br \/>\n    StrictHostKeyChecking yes<br \/>\nEOF<\/span><\/p>\n<p>ssh \u5df2\u8fdc\u8fdc\u8d85\u8d8a\u4e86\u7b80\u5355\u7684&#034;\u8fdc\u7a0b Shell&#034;\u5b9a\u4f4d\u3002\u5176\u7aef\u53e3\u8f6c\u53d1\u529f\u80fd\u4f7f\u5176\u6210\u4e3a\u6784\u5efa\u5b89\u5168\u7f51\u7edc\u901a\u9053\u7684\u745e\u58eb\u519b\u5200&#xff0c;\u800c\u5bc6\u94a5\u8ba4\u8bc1\u548c\u914d\u7f6e\u6587\u4ef6\u5219\u8ba9\u591a\u670d\u52a1\u5668\u7ba1\u7406\u53d8\u5f97\u5b89\u5168\u548c\u9ad8\u6548\u3002\u6bcf\u4e2a Linux \u4ece\u4e1a\u8005\u5bf9 ssh \u7684\u7406\u89e3\u6df1\u5ea6&#xff0c;\u5f80\u5f80\u51b3\u5b9a\u4e86\u5176\u8fd0\u7ef4\u6548\u7387\u7684\u4e0a\u9650\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u547d\u4ee4-ssh&#xff08;SSH \u8fdc\u7a0b\u767b\u5f55\u5de5\u5177&#xff09; \u5feb\u901f\u53c2\u8003\u57fa\u672c\u8fde\u63a5SSH \u914d\u7f6e\u6587\u4ef6\u7aef\u53e3\u8f6c\u53d1&#xff08;SSH \u96a7\u9053&#xff09;\u6587\u4ef6\u4f20\u8f93\u76f8\u5173X11 \u8f6c\u53d1\u4e0e\u56fe\u5f62SSH \u9009\u9879\u901f\u67e5\u5e38\u7528\u7ec4\u5408\u5b89\u5168\u6700\u4f73\u5b9e\u8df5 ssh&#xff08;Secure Shell&#xff09;\u662f Linux\/Unix \u4e16\u754c\u4e2d\u6700\u6838\u5fc3\u7684\u8fdc\u7a0b\u7ba1\u7406\u5de5\u5177&#xff0c;\u7528\u4e8e\u5b89\u5168\u5730\u767b\u5f55\u8fdc\u7a0b\u4e3b\u673a\u5e76\u6267\u884c\u547d\u4ee4\u3002\u5b83\u901a\u8fc7\u52a0\u5bc6\u96a7\u9053\u4f20\u8f93\u6240\u6709\u6570\u636e&#xff0c;\u66ff\u4ee3\u4e86\u4e0d\u5b89\u5168\u7684 telnet \u548c rlogin<\/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,77,44],"topic":[],"class_list":["post-91600","post","type-post","status-publish","format-standard","hentry","category-server","tag-linux","tag-ssh","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\u547d\u4ee4-ssh\uff08SSH \u8fdc\u7a0b\u767b\u5f55\u5de5\u5177\uff09 - \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\/91600.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\u547d\u4ee4-ssh\uff08SSH \u8fdc\u7a0b\u767b\u5f55\u5de5\u5177\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Linux\u547d\u4ee4-ssh&#xff08;SSH \u8fdc\u7a0b\u767b\u5f55\u5de5\u5177&#xff09; \u5feb\u901f\u53c2\u8003\u57fa\u672c\u8fde\u63a5SSH \u914d\u7f6e\u6587\u4ef6\u7aef\u53e3\u8f6c\u53d1&#xff08;SSH \u96a7\u9053&#xff09;\u6587\u4ef6\u4f20\u8f93\u76f8\u5173X11 \u8f6c\u53d1\u4e0e\u56fe\u5f62SSH \u9009\u9879\u901f\u67e5\u5e38\u7528\u7ec4\u5408\u5b89\u5168\u6700\u4f73\u5b9e\u8df5 ssh&#xff08;Secure Shell&#xff09;\u662f Linux\/Unix \u4e16\u754c\u4e2d\u6700\u6838\u5fc3\u7684\u8fdc\u7a0b\u7ba1\u7406\u5de5\u5177&#xff0c;\u7528\u4e8e\u5b89\u5168\u5730\u767b\u5f55\u8fdc\u7a0b\u4e3b\u673a\u5e76\u6267\u884c\u547d\u4ee4\u3002\u5b83\u901a\u8fc7\u52a0\u5bc6\u96a7\u9053\u4f20\u8f93\u6240\u6709\u6570\u636e&#xff0c;\u66ff\u4ee3\u4e86\u4e0d\u5b89\u5168\u7684 telnet \u548c rlogin\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/91600.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-07T23:09:36+00:00\" \/>\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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/91600.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/91600.html\",\"name\":\"Linux\u547d\u4ee4-ssh\uff08SSH \u8fdc\u7a0b\u767b\u5f55\u5de5\u5177\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-07T23:09:36+00:00\",\"dateModified\":\"2026-08-07T23:09:36+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/91600.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/91600.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/91600.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u547d\u4ee4-ssh\uff08SSH \u8fdc\u7a0b\u767b\u5f55\u5de5\u5177\uff09\"}]},{\"@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":"Linux\u547d\u4ee4-ssh\uff08SSH \u8fdc\u7a0b\u767b\u5f55\u5de5\u5177\uff09 - \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\/91600.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux\u547d\u4ee4-ssh\uff08SSH \u8fdc\u7a0b\u767b\u5f55\u5de5\u5177\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Linux\u547d\u4ee4-ssh&#xff08;SSH \u8fdc\u7a0b\u767b\u5f55\u5de5\u5177&#xff09; \u5feb\u901f\u53c2\u8003\u57fa\u672c\u8fde\u63a5SSH \u914d\u7f6e\u6587\u4ef6\u7aef\u53e3\u8f6c\u53d1&#xff08;SSH \u96a7\u9053&#xff09;\u6587\u4ef6\u4f20\u8f93\u76f8\u5173X11 \u8f6c\u53d1\u4e0e\u56fe\u5f62SSH \u9009\u9879\u901f\u67e5\u5e38\u7528\u7ec4\u5408\u5b89\u5168\u6700\u4f73\u5b9e\u8df5 ssh&#xff08;Secure Shell&#xff09;\u662f Linux\/Unix \u4e16\u754c\u4e2d\u6700\u6838\u5fc3\u7684\u8fdc\u7a0b\u7ba1\u7406\u5de5\u5177&#xff0c;\u7528\u4e8e\u5b89\u5168\u5730\u767b\u5f55\u8fdc\u7a0b\u4e3b\u673a\u5e76\u6267\u884c\u547d\u4ee4\u3002\u5b83\u901a\u8fc7\u52a0\u5bc6\u96a7\u9053\u4f20\u8f93\u6240\u6709\u6570\u636e&#xff0c;\u66ff\u4ee3\u4e86\u4e0d\u5b89\u5168\u7684 telnet \u548c rlogin","og_url":"https:\/\/www.wsisp.com\/helps\/91600.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-07T23:09:36+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/91600.html","url":"https:\/\/www.wsisp.com\/helps\/91600.html","name":"Linux\u547d\u4ee4-ssh\uff08SSH \u8fdc\u7a0b\u767b\u5f55\u5de5\u5177\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-07T23:09:36+00:00","dateModified":"2026-08-07T23:09:36+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/91600.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/91600.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/91600.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux\u547d\u4ee4-ssh\uff08SSH \u8fdc\u7a0b\u767b\u5f55\u5de5\u5177\uff09"}]},{"@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\/91600","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=91600"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/91600\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=91600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=91600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=91600"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=91600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}