使用远程 FTP 原子包和私钥发出与服务器的连接 [英] Issue Connection to server using Remote-FTP atom package and Private Keys

查看:31
本文介绍了使用远程 FTP 原子包和私钥发出与服务器的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 atom 包Remote-FTP"并使用私钥连接到我的服务器.

I'm trying to connect to my server using the atom package "Remote-FTP" and using a private key.

我的服务器上设置了 SSH 密钥,并且可以使用 putty 成功连接.

I have the SSH keys set up on my server and can connect successfully using putty.

私钥保存在我的项目文件夹中,并且当我替换文件中的信息时,我有一个现有的 .ftpconfig 文件(没有私钥)可以成功连接.

The private key is saved in my project folder and I have an existing .ftpconfig file (without a private key) that connects successfully when I replace the information inside the file.

密钥已转换为必要的 ssh 格式,目前我没有密码.我也给出了私钥文件的完整路径

The Key has been converted to the necessary ssh format and I have no passphrase at the moment. I have also gave the full path of the private key file

这是我的 .ftpconfig 文件 -

Here is my .ftpconfig file -

{
"protocol": "sftp",
"host": "user@server",
"port": 22,
"user": "",
"pass": "",
"promptForPass": false,
"remote": "",
"local": "",
"agent": "",
"privatekey": "putty_private_key_sbappsupconvrted.ppk",
"passphrase": "",
"hosthash": "",
"ignorehost": true,
"connTimeout": 10000,
"keepalive": 10000,
"keyboardInteractive": true,
"watch": [],
"watchTimeout": 500
}

我收到的错误代码是:

远程 FTP:连接...

REMOTE FTP: Connection...

远程 FTP:连接失败错误:getaddrinfo EAI_FAIL user@server:22

REMOTE FTP: Connection failed Error: getaddrinfo EAI_FAIL user@server: 22

远程 FTP:连接已关闭

REMOTE FTP: Connection closed

我也给出了私钥文件的完整路径

I have also given the full path of the private key file

C:Usersuser.atomserverputty_private_key_sbappsupconvrted.ppk

我得到了这个错误

无法解析 .ftpconfig 位置 219 处 JSON 格式的意外令牌 U

Could not parse .ftpconfig Unexpected token U in JSON at position 219

任何帮助将不胜感激

推荐答案

把你的私钥放在如下路径:C:UsersUSERAppDataLocalatomapp-1.30.0

Put your private key in following path: C:UsersUSERAppDataLocalatomapp-1.30.0

替换 USER.它似乎在此文件夹中查找密钥.

Replace USER. It seems it looks in this folder for the keys.

这篇关于使用远程 FTP 原子包和私钥发出与服务器的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆