ssh -NfR 13389:localhost:3389 root@1.2.3.4<\/pre>\n\u53cd\u904e\u4f86\u628a 1.2.3.4 \u7684 80 port \u670d\u52d9\u639b\u5230\u672c\u6a5f\u7684 8080 port (\u6b63\u5411\u9023\u7d50)<\/h4>\n
ssh -NfL 8080:localhost:80 root@1.2.3.4<\/pre>\n<\/h4>\n
\u60c5\u5883A : \u4e3b\u6a5f\u5728\u5927\u9678 , \u4f7f\u7528\u8005\u5728\u53f0\u7063 , \u9060\u7aef\u4f3a\u670d\u5668\u63a1\u7528 SSH Client \u9023\u4e0a\u53f0\u7063\u7aef SSH Server , \u9032\u800c\u8b93\u4f7f\u7528\u8005\u96fb\u8166\u53ef\u4ee5\u9023\u7dda\u4f7f\u7528<\/h4>\n
\nClient -> \u53f0\u7063 SSH Server <- \u5927\u9678\u7aefERP\u4f3a\u670d\u5668 with SSH Client<\/p>\n<\/blockquote>\n
\u512a\u9ede :<\/strong> \u5927\u9678\u7aef\u4e0d\u9700\u4efb\u4f55\u7db2\u8def\u8a2d\u5b9a , \u50c5\u9700\u5b89\u88dd SSH Client \u8edf\u9ad4 , \u5b9a\u6642\u56de\u9023\u5230\u53f0\u7063\u7aef SSH Server , \u7bc0\u7701\u6210\u672c<\/p>\n
\u7f3a\u9ede :<\/strong> \u5927\u9678\u5b98\u65b9\u4e0d\u5b9a\u6642\u6703\u5f37\u5236\u4e2d\u65b7 SSH Session , \u82e5\u4f7f\u7528 Windows \u6392\u7a0b\u7e2e\u77ed\u6642\u9593\u96d6\u53ef\u6e1b\u5c11\u65b7\u7dda\u6a5f\u6703 , \u4f46\u6703\u5927\u9678\u7aefERP\u4f3a\u670d\u5668\u6703\u5b58\u5728\u5927\u91cf\u5931\u6557\u7684 Session , \u9032\u800c\u5f71\u97ff\u4e3b\u6a5f\u6548\u80fd (\u53ef\u4f7f\u7528 taskkill \/f \/im ssh.exe \u5f37\u5236\u522a\u9664\u57f7\u884c\u7a0b\u5f0f\u6539\u5584 , \u4f46\u6703\u5f37\u5236\u65b7\u7dda)<\/p>\n
<\/h4>\n
\u60c5\u5883B : \u4e3b\u6a5f\u5728\u5927\u9678 , \u4f7f\u7528\u8005\u5728\u53f0\u7063 , \u9060\u7aef\u4f3a\u670d\u5668\u63a1\u7528 SSH Client \u9023\u4e0a\u5927\u9678\u7aef SSH Server , \u518d\u9023\u4e0a\u53f0\u7063\u7aef SSH Server , \u9032\u800c\u8b93\u4f7f\u7528\u8005\u96fb\u8166\u53ef\u4ee5\u9023\u7dda\u4f7f\u7528<\/h4>\n
\nClient -> \u53f0\u7063 SSH Server <- \u5927\u9678 SSH Server\u00a0 <- \u5927\u9678\u7aefERP\u4f3a\u670d\u5668 with SSH Client<\/p>\n<\/blockquote>\n
\u512a\u9ede :<\/strong> \u5982\u4e0a\u9762\u7f3a\u9ede , \u70ba\u88dc\u5f37\u5927\u9678\u7aef\u65b9\u4e0d\u5b9a\u6642\u5f37\u5236\u4e2d\u65b7 SSH Session \u554f\u984c , \u628a\u5927\u9678 SSH Server \u8207 \u53f0\u7063 SSH Server \u4e92\u806f\u6642\u9593\u7e2e\u77ed\u81f3\u6bcf\u5206\u9418 , \u5982\u6b64\u6e1b\u5c11\u65b7\u7dda\u6a5f\u6703<\/p>\n
\u7f3a\u9ede :<\/strong> \u5927\u9678\u7aef SSH Server \u540c\u6a23\u6703\u7d2f\u7a4d\u8a31\u591a\u5931\u6557\u7684 Session , \u4f46\u56e0\u70ba\u5df2\u812b\u96e2\u539f\u672c\u9060\u7aef\u4f3a\u670d\u5668 , \u56e0\u53ea\u4e0d\u81f3\u65bc\u5f71\u97ff\u4e3b\u6a5f\u6548\u80fd , \u5f8c\u7e8c\u6392\u7a0b\u5b9a\u6642\u91cd\u958b\u6a5f\u91cb\u653eSession\u4e5f\u662f\u500b\u65b9\u6cd5<\/p>\n
<\/h4>\n
\u7522\u751f SSH key<\/h4>\n
ssh-keygen<\/pre>\n\u516c\u9470 id_rsa.pub \u8907\u88fd\u5230 ~\/.ssh\/authorized_keys<\/p>\n
\u79c1\u9470 id_rsa \u4e1f\u7d66\u9700\u8981\u806f\u5165\u7684\u5de5\u4f5c\u7aef\u514d\u53bb\u8f38\u5165\u5bc6\u78bc\u6d41\u7a0b<\/p>\n
<\/h3>\n
\u628a sshd_config \u8a2d\u5b9a\u958b\u653e , \u4e26\u91cd\u958b\u6a5f<\/h3>\n
AllowTcpForwarding yes<\/pre>\n<\/h4>\n
Client \u7aef\u82e5\u6709\u591a\u7d44\u79c1\u9470 , \u6309\u7167\u4ee5\u4e0b\u65b9\u6cd5\u5340\u5206<\/h4>\n
Host 1.1.1.1\r\n Hostname 1.1.1.1\r\n IdentityFile=C:\\Users\\Administrator\\.ssh\\id_rsa\r\n\r\nHost 2.2.2.2\r\n Hostname 2.2.2.2\r\n IdentityFile=C:\\Users\\Administrator\\.ssh\\id_rsa2<\/pre>\n<\/div><\/div><\/div>