使用其他 SSH 工具连接开发环境

您所在的位置:网站首页 ssh连接app 使用其他 SSH 工具连接开发环境

使用其他 SSH 工具连接开发环境

#使用其他 SSH 工具连接开发环境 | 来源: 网络整理| 查看: 265

使用其他 SSH 工具连接开发环境 更新时间:

本节介绍如何通过其他 SSH 工具访问您创建的开发环境。

# 操作步骤 # 1.设置 SSH Key

设置 SSH Key 后,您可使用您设置的密码或秘钥,通过 SSH 工具远程连接您的开发环境。 参考 管理 SSH Key 添加密码或秘钥。

私钥文件存放在您本机的 C:\Users\用户\.ssh 目录下,若该目录下存在同名文件,可将私钥文件重命名为 id_rsaEnv 后再存于该目录下。

# 2.获取开发环境连接信息

您在初始化开发环境时,勾选了 SSH 设置 为 开启,可在具体项目的 开发环境实例 页复制连接信息,如下图所示。 若 开发环境实例 页无上述信息可复制,可尝试停止开发环境后,在 修改 SSH 配置 中配置为 开启,再启动开发环境即可有上述 ssh 连接信息。

# 3.使用SSH工具连接开发环境

推荐使用如下工具连接开发环境,为您提供 Xshell 连接开发环境 和本机自带 终端连接开发环境 作为参考,其他工具连接方式大同小异。

Xshell SecureCRT PuTTY Xmanager # Xshell 连接开发环境 在 Xshell 中选择 文件 > 新建。 在弹出的连接对话框中,将复制出来的连接信息按提示填写到框中,并单击 连接。 系统弹出 SSH安全警告 的对话框。 在对话框中选择 接受并保存。 系统弹出如下 SSH 用户名 框。 在弹出的 SSH 用户名 框中填写用户名,随后单击 确定。 在弹出的 SSH用户身份验证 框中输入 1.设置-ssh-key 中设置的密码。 单击 确定,返回如下所示即为连接成功。Connecting to 192.168.0.25:30022... Connection established. To escape to local shell, press 'Ctrl+Alt+]'. WARNING! The remote SSH server rejected X11 forwarding request. 复用SSH连接([email protected])[连接数量: 1] Last login: Mon Dec 19 20:35:07 2022 from 192.168.0.1 root@531d8f129d0d9d8fb4f105ea404f843c-taskrole1-0:~# # 终端连接开发环境

打开您计算机的 终端,并将复制的连接信息粘贴进去并回车。

说明:若您想以秘钥方式连接开发环境,您需将对应的私钥文件存放在您本机的 C:\Users\用户\.ssh 目录下,若以重命名的方式存放的,您需在如下连接串中加 -i 参数指定私钥位置,如 -i ~/.ssh/id_rsaEnv

PS C:\Users\16052> ssh -p 30022 suyu@[email protected]@192.168.0.25

系统返回如下信息后,输入 yes。

The authenticity of host '[192.168.0.25]:30022 ([192.168.0.25]:30022)' can't be established. RSA key fingerprint is SHA256:Sn7bxm6dAZ9gse/hObOeH9a7vrlSNeqrZKsD0G2fN50. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes

随后按提示输入 1.设置-ssh-key 中设置的密码。

说明:若以秘钥方式连接开发环境,则无需输入密码。

Warning: Permanently added '[192.168.0.25]:30022' (RSA) to the list of known hosts. suyu@[email protected]@192.168.0.25's password:

系统返回如下信息,表明远程连接开发环境成功。

开始连接到 [email protected] 0.2 Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-135-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage This system has been minimized by removing packages and content that are not required on a system that users do not log into. To restore this content, you can run the 'unminimize' command. The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@531d8f129d0d9d8fb4f105ea404f843c-taskrole1-0:~#

← 使用 PyCharm 连接开发环境 平台 →



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3