liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.5k stars 264 forks source link

~/.ssh/config not found #691

Open apj68 opened 4 years ago

apj68 commented 4 years ago

Do you read the FAQ?

Describe the bug When I first installed and attempted to use vscode-sftp I received an error: "/.ssh/config not found". I thought to myself, "OH! Cool, let me create that." So I created that file but now it doesn't seem to look for it. I get this error:

"connectTimeout":10000,"interactiveAuth":false,"secure":false,"remoteTimeOffsetInHours":0,"name":"2133","host":"cskpcloudxn2133.cloud.kp.org","port":22,"username":"******"}
[11-19 10:03:34] [error] Error: Config Not Found. (output:tasks) 
  at Object.u [as handleCtxFromUri] (c:\Users\O386600\.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:41793)
  at Object.<anonymous> (c:\Users\O386600\.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:3993)
  at Generator.next (<anonymous>)
  at c:\Users\O386600\.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:3273
  at new Promise (<anonymous>)
  at r (c:\Users\O386600\.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:3050)
  at c:\Users\O386600\.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:3935
  at Array.map (<anonymous>)
  at Object.<anonymous> (c:\Users\O386600\.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:3928)
  at Generator.next (<anonymous>)
  at s (c:\Users\O386600\.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:3106) 

To Reproduce Steps to reproduce the behavior:

  1. Install and configure vscode-sftp for a specific host
  2. Choose a file and sftp: active file
  3. See first error "/.ssh/config not found"
  4. Create "/.ssh/config not found" with configuration information for specific host in step #1
  5. Run sftp: active file and see second error

Expected behavior I expect the vscode-sftp to use the .vscode/sftp.json file to work with the <home>/.ssh/config file to seamlessly upload the file to the designated server.

Desktop (please complete the following information):

Extension Logs from Startup - required [11-19 10:29:12] [debug] register command "Cancel All Transfer" from "./commandCancelAllTransfer.ts" [11-19 10:29:12] [debug] register command "Config" from "./commandConfig.ts" [11-19 10:29:12] [debug] register command "List Active Folder" from "./commandListActiveFolder.ts" [11-19 10:29:12] [debug] register command "Open Ssh Connection" from "./commandOpenSshConnection.ts" [11-19 10:29:12] [debug] register command "Set Profile" from "./commandSetProfile.ts" [11-19 10:29:12] [debug] register command "Toggle Output Panel" from "./commandToggleOutputPanel.ts" [11-19 10:29:12] [debug] register command "Upload Changed Files" from "./commandUploadChangedFiles.ts" [11-19 10:29:12] [debug] register command "Delete Remote" from "./fileCommandDeleteRemote.ts" [11-19 10:29:12] [debug] register command "Diff" from "./fileCommandDiff.ts" [11-19 10:29:12] [debug] register command "Diff Active File" from "./fileCommandDiffActiveFile.ts" [11-19 10:29:12] [debug] register command "Download" from "./fileCommandDownload.ts" [11-19 10:29:12] [debug] register command "Download Active File" from "./fileCommandDownloadActiveFile.ts" [11-19 10:29:12] [debug] register command "Download Active Folder" from "./fileCommandDownloadActiveFolder.ts" [11-19 10:29:12] [debug] register command "Download File" from "./fileCommandDownloadFile.ts" [11-19 10:29:12] [debug] register command "Download Folder" from "./fileCommandDownloadFolder.ts" [11-19 10:29:12] [debug] register command "Download Force" from "./fileCommandDownloadForce.ts" [11-19 10:29:12] [debug] register command "Download Project" from "./fileCommandDownloadProject.ts" [11-19 10:29:12] [debug] register command "Edit In Local" from "./fileCommandEditInLocal.ts" [11-19 10:29:12] [debug] register command "List" from "./fileCommandList.ts" [11-19 10:29:12] [debug] register command "List All" from "./fileCommandListAll.ts" [11-19 10:29:12] [debug] register command "Reveal In Explorer" from "./fileCommandRevealInExplorer.ts" [11-19 10:29:12] [debug] register command "Reveal In Remote Explorer" from "./fileCommandRevealInRemoteExplorer.ts" [11-19 10:29:12] [debug] register command "Sync Both Directions" from "./fileCommandSyncBothDirections.ts" [11-19 10:29:12] [debug] register command "Sync Local To Remote" from "./fileCommandSyncLocalToRemote.ts" [11-19 10:29:12] [debug] register command "Sync Remote To Local" from "./fileCommandSyncRemoteToLocal.ts" [11-19 10:29:12] [debug] register command "Upload" from "./fileCommandUpload.ts" [11-19 10:29:12] [debug] register command "Upload Active File" from "./fileCommandUploadActiveFile.ts" [11-19 10:29:12] [debug] register command "Upload Active Folder" from "./fileCommandUploadActiveFolder.ts" [11-19 10:29:12] [debug] register command "Upload File" from "./fileCommandUploadFile.ts" [11-19 10:29:12] [debug] register command "Upload Folder" from "./fileCommandUploadFolder.ts" [11-19 10:29:12] [debug] register command "Upload Force" from "./fileCommandUploadForce.ts" [11-19 10:29:12] [debug] register command "Upload Project" from "./fileCommandUploadProject.ts" [11-19 10:29:12] [info] config at c:\Users\O386600\gitrepos\kp_mde_icinga\ntier-dashboard {"remotePath":"/tmp","uploadOnSave":true,"downloadOnOpen":false,"ignore":[],"concurrency":4,"protocol":"sftp","connectTimeout":10000,"interactiveAuth":false,"secure":false,"remoteTimeOffsetInHours":0,"name":"2133","host":"cskpcloudxn2133.cloud.kp.org","port":22,"username":"**"} [11-19 10:29:49] [trace] run command 'Upload Active File' [11-19 10:29:49] [error] Error: Config Not Found. (output:extension-output-%233) at Object.u [as handleCtxFromUri] (c:\Users\O386600.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:41793) at Object. (c:\Users\O386600.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:3993) at Generator.next () at c:\Users\O386600.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:3273 at new (c:\Users\O386600.vscode\extensions\vscjava.vscode-java-test-0.21.0\dist\extension.js:9:282228) at r (c:\Users\O386600.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:3050) at c:\Users\O386600.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:3935 at Array.map () at Object. (c:\Users\O386600.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:3928) at Generator.next () at s (c:\Users\O386600.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:1:3106) at o (c:\Users\O386600.vscode\extensions\vscjava.vscode-java-test-0.21.0\dist\extension.js:9:263120) at c:\Users\O386600.vscode\extensions\vscjava.vscode-java-test-0.21.0\dist\extension.js:9:263614

If I subsequently remove the <home>/.ssh/config file I still get the same error but this is the last line in the log file:

[11-19 10:32:45] [warn] ENOENT: no such file or directory, open 'C:\Users\O386600\.ssh\config' load C:\Users\O386600\.ssh\config failed

Hence, I get an error either way.

aripp commented 4 years ago

The warning also appears with me under Windows 10. But the SFTP commands are mostly executed anyway. I simply created the .ssh directory manually. But it is empty. [12-23 10:41:01] [warn] ENOENT: no such file or directory, open 'C:\Users\<username>\.ssh\config' load C:\Users\<username>\.ssh\config failed

akhyarkamili commented 4 years ago

I have the same issue! I use Fedora 31.

Re: I don't remember what I changed - but it's resolved. So I guess it's resolvable from the user side at the very least.

erikskruze commented 4 years ago

I faced the same issue. It disappeared by re-installing the sftp extension.

oneilonline commented 4 years ago

I tried reinstalling sftp ext, creating the .ssh directory and blank config file, still same issue. Windows 10 / VSCode 1.48.2 / SFTP 1.12.9

evrend commented 4 years ago

I have the same problem with Windows 10 / VSCode 1.48.2 / SFTP 1.12.9. like @oneilonline. I think, the problem related with hdd driver letter uppercase/lowercase sensivity. It must be uppercase but the path(config file) is containing lowercase driver name. I don't know how can i solve this case sensivity problem? I need help.

Edit: I tried re-installing plugin but not solved.

image

lingzyuan commented 3 years ago

Same issue here. Windows 10 Enterprise, VSCode 1.52.1 sftp 1.12.9

lingzyuan commented 3 years ago

Found info in another issue: https://github.com/liximomo/vscode-sftp/issues/742

Solved my problem. Here's the translation: Add "profiles": {} in sftp config file.

makarovpro commented 3 years ago

Can't you fix the plugin?! 2 months ago there were no such problems with SFTP!

pajarrahmansyah commented 3 years ago

Found info in another issue:

742

Solved my problem. Here's the translation: Add "profiles": {} in sftp config file.

This is working for me, Thanks @lingzyuan

makarovpro commented 3 years ago

Found info in another issue:

742

Solved my problem. Here's the translation: Add "profiles": {} in sftp config file.

This is working for me, Thanks @lingzyuan

Did I do the right thing? The error still remains! 2021-06-09_19-01-01

pajarrahmansyah commented 3 years ago

Found info in another issue:

742

Solved my problem. Here's the translation: Add "profiles": {} in sftp config file.

This is working for me, Thanks @lingzyuan

Did I do the right thing? The error still remains! 2021-06-09_19-01-01

Yeah, like that. I just added "profiles": {} Have you seen a clue or information from the terminal after saving the file then reconnect?

r00t-64 commented 3 years ago

I HAVE THE SAME ISSUE , IDK HOW TO FIX IT

mnlx commented 3 years ago

I had the same issue, then I found out it was a cache issue with my vscode remote config in my local machine. I was searching in the remote machine.

I moved the foder to a *.bkp like the following:

image

Then I restarted vscode and was able to connect.

** I don't use sftp, but I believe its the same principal

wdburgdorf commented 2 years ago

Same thing here, the suggested solutions did not work for me. Up-/downloading a file works fine, but not folder. EDIT: I see this error message:

[02-06 20:48:03] [warn] ENOENT: no such file or directory, open '/home/lausianne/.ssh/config' load /home/lausianne/.ssh/config failed

/home/lausianne/.ssh/ is indeed the wrong path. But how can I set the correct one?

EDIT2: Eventually I figured it out: I needed "context": "." in the config file. Seems quite essential to me, but is not in the sample config file. It would have made it easier for me to get started if it was ... Thanks!