SSH 连接阿里云
本来是 DBeaver 连接数据库时下不下来驱动,网络环境太麻烦了。最后好像是要搞一个跳板机,就用阿里云上的测试环境了。连接完跳板机后再 DBeaver 中设置了网络连接的代理,和 Proxy 才搞好( 127.0.0.1:1080 )。
配置流程
打开 CMD,创建并打开 SSH 文件:
C:\Users\qiyuanc>mkdir ssh
C:\Users\qiyuanc>code .ssh
使用 code 命令后,就用默认编辑器打开 config 文件了,我的是 VSCode。
然后在配置文件中添加主机 IP、端口、用户等信息:
Host github.com
HostName github.com
Port 22
ProxyCommand "F:\Git\mingw64\bin\connect.exe" -H 10.167.196.133:8080 %h %p
Host new-jaguar-test01
HostName 47.100.14.158
User root
Port 40201
ProxyCommand "F:\Git\mingw64\bin\connect.exe" -H 10.167.196.133:8080 %h %p
保存后,在 CMD 中尝试配置是否成功:
C:\Users\lizht>ssh github.com
The authenticity of host 'github.com (<no hostip for proxy command>)' can't be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
出现这样的就是成功了,连接阿里云的还需要密码( IP 打码啦):
C:\Users\lizht>ssh new-jaguar-test01
The authenticity of host '[xx.xxx.xx.xxx]:40201 (<no hostip for proxy command>)' can't be established.
ECDSA key fingerprint is SHA256:kaeeWWlZ4cMuJh37cXeRm1kAIzWcEHl0rfixDi2epGE.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[xx.xxx.xx.xxx]:40201' (ECDSA) to the list of known hosts.
[email protected]'s password:
或者使用如下命令:
C:\Users\lizht>ssh -D 1080 new-jaguar-test01
[email protected]'s password:
Last login: Tue Apr 18 14:01:23 2023 from 223.111.68.150
Welcome to Alibaba Cloud Elastic Compute Service !
[root@jaguar-test-01 ~]#
输入密码验证身份后即连接成功。
标签:Users,xxx,xx,阿里,SSH,fingerprint,连接,ssh From: https://www.cnblogs.com/qiyuanc/p/Course1.html