question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot upload with private key

See original GitHub issue

Do you read the FAQ?

Describe the bug Upload on save does (still) not work, error is:

[error] Error: [<hostname>]: connect EBADF <ip>:<60000>
	at Client.<anonymous> (/Users/<removed>/.vscode/extensions/natizyskunk.sftp-1.13.2/dist/extension.js:61:99994)

To Reproduce Hit save, observe error, see output tab

Expected behavior Save and upload works w/o error

Screenshots

Desktop (please complete the following information):

  • OS: macOS 11.4
  • VSCode 1.57.1
  • Extension Version 1.13.2

Extension Logs from Startup - required

[07-07 20:23:37] [info] [file-save] /Users/<removed>/Sites/<link/to/my/file>.php
[07-07 20:23:37] [trace] handle upload file for /Users/<removed>/Sites/<link/to/my/file>.php
[07-07 20:23:37] [debug] Custom crypto binding not available
[07-07 20:23:37] [debug] Client: Trying <hostname> on port 60000 ...
[07-07 20:23:37] [debug] Local ident: 'SSH-2.0-ssh2js1.1.0'
[07-07 20:23:37] [debug] Socket error: connect EBADF <ip>:60000
[07-07 20:23:37] [error] Error: [<hostname>]: connect EBADF <ip>:60000
	at Client.<anonymous> (/Users/<removed>/.vscode/extensions/natizyskunk.sftp-1.13.2/dist/extension.js:61:99994)
	at Client.emit (events.js:327:22)
	at Socket.<anonymous> (/Users/<removed>/.vscode/extensions/natizyskunk.sftp-1.13.2/node_modules/ssh2/lib/client.js:724:12)
	at Socket.emit (events.js:315:20)
	at emitErrorNT (internal/streams/destroy.js:106:8)
	at emitErrorCloseNT (internal/streams/destroy.js:74:3)
	at processTicksAndRejections (internal/process/task_queues.js:80:21) download /Users/<removed>/Sites/<link/to/my/file>.php
[07-07 20:23:37] [debug] Socket closed

sftp.json

{
    "name": "<removed>",
    "host": "<removed>",
    "protocol": "sftp",
    "port": 60000,
    "username": "root",
    "remotePath": "/<removed>",
    "privateKeyPath": "/Users/<removed>/.ssh/id_ed25519",
    "uploadOnSave": true
}

Notes:

  • I use sftp, custom port.
  • I have not set a password.
  • I use key file (id_ed25519.pub), key is valid and available.
  • VS Code has “full disk access” in macOS settings.
  • I can connect in Terminal successfully, it also worked flawlessly with liximomo an last VS Code Version.
  • I’m puzzled.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dexamenoscommented, Jul 9, 2021

Little Snitch is basically an outgoing firewall. It is used to block outgoing traffic.

See here for more details https://obdev.at/products/littlesnitch/index.html

I would assume that it is quite popular among Mac Users.

You can block specific hostnames, ports or IP addresses for every binary. Although my VSCode was set to “allow all traffic” I must have messed up some rules and set some to deny. Maybe also something changed in one of the last VSCode updates, as I have noticed, a couple of helper processes are now used (Little Snitch blocks on a per-process level).

1reaction
dexamenoscommented, Jul 9, 2021

@Natizyskunk : you might now officially beat me. 🤪🥊

I have solved the issue and it actually turned out to be on my end. Disabled Litte Snitch and everything works like a charm. 👍

I will still have to look into the details, as the VSCode binary was set to “allow all connection”.

Merci beaucoup for spending your time!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot upload the private key - FileZilla Forums
I'm having probles with uploading the privte key I generated with PUTTY. Simply I generate and save the private key. Then I click...
Read more >
Not able to upload Private key "does not certify the public key"
So as of now , the workaround is to delete all the private keys which are using the deleted certificate in their certificate...
Read more >
Upload of valid PEM certificate + key file throws error citing ...
When trying to upload a PEM-encoded certificate + private key file, which I have verified is valid, both the Azure portal and API...
Read more >
How to recover from "Error: The private key could not be ...
After uploading the un-encrypted key via the Administration Console, it should then be deleted from your local system.
Read more >
Upload a certificate (public key) with one of the following file ...
I got the below error: "ClientCertificateCredential authentication failed: The certificate certificate does not have a private key. "
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found