newinnovations / remote-edit-ni

Atom package to browse and edit remote files using SSH and FTP. This fork supports atom 1.41.x and adds some new features.
https://atom.io/packages/remote-edit-ni
MIT License
18 stars 2 forks source link

Uncaught Error: Malformed private key (expected sequence). Bad passphrase? #42

Open g-rocket opened 5 years ago

g-rocket commented 5 years ago

When connecting to a ssh host with a password-protected private key and no password specified, remote-edit-ni throws an error instead of prompting for the password.

Steps to reproduce:

  1. Add a ssh host to remote-edit-ni that has a password-protected private key
  2. Leave the "Private key passphrase:" field blank
  3. Attempt to connect to the host.
  4. Rather than prompting for the passphrase, this error is thrown.

Atom: 1.34.0 x64 Electron: 2.0.16 OS: Mac OS X 10.14.3 Thrown From: remote-edit-ni package 3.5.1

Stack Trace

Uncaught Error: Malformed private key (expected sequence). Bad passphrase?

At /Users/gavinsyancey/.atom/packages/remote-edit-ni/node_modules/ssh2-streams/lib/utils.js:322

Error: Malformed private key (expected sequence). Bad passphrase?
    at genPublicKey (/packages/remote-edit-ni/node_modules/ssh2-streams/lib/utils.js:322:13)
    at Client.connect (/packages/remote-edit-ni/node_modules/ssh2/lib/client.js:155:29)
    at /packages/remote-edit-ni/lib/model/sftp-host.coffee:166:23
    at fn (/packages/remote-edit-ni/node_modules/async/lib/async.js:746:34)
    at /packages/remote-edit-ni/node_modules/async/lib/async.js:1213:16
    at /packages/remote-edit-ni/node_modules/async/lib/async.js:166:37
    at /packages/remote-edit-ni/node_modules/async/lib/async.js:706:43
    at /packages/remote-edit-ni/node_modules/async/lib/async.js:167:37
    at /packages/remote-edit-ni/node_modules/async/lib/async.js:1209:30
    at /packages/remote-edit-ni/lib/model/sftp-host.coffee:125:17
    at FSReqWrap.cb [as oncomplete] (fs.js:312:19)

Commands

     -1:36.8.0 remote-edit:browse (input#remote-edit-ni.storePasswordsUsingKeytar.input-checkbox)
  2x -1:33.9.0 hostview:delete (input.hidden-input)
     -1:32.4.0 remote-edit:new-sftp-host (input.hidden-input)
     -1:28.6.0 host-view:focus-next (input.hidden-input)
     -1:27.3.0 core:backspace (input.hidden-input)
     -1:24.1.0 host-view:focus-next (input.hidden-input)
 16x -1:23.2.0 core:backspace (input.hidden-input)
  2x -0:32.7.0 remote-edit:close-all-connections (input#remote-edit-ni.storePasswordsUsingKeytar.input-checkbox)
     -0:25.9.0 remote-edit:browse (div.package-detail.panels-item)
     -0:23.1.0 remote-edit:new-sftp-host (input.hidden-input)
  2x -0:21.1.0 core:backspace (input.hidden-input)
     -0:19.6.0 host-view:focus-next (input.hidden-input)
  2x -0:18.8.0 core:backspace (input.hidden-input)
     -0:17.3.0 host-view:focus-next (input.hidden-input)
 15x -0:16.5.0 core:backspace (input.hidden-input)
     -0:09.9.0 remote-edit:browse (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-atom-light-syntax.theme-atom-light-ui)

Non-Core Packages

block-select 1.0.0 
remote-edit-ni 3.5.1