sveale / remote-edit

remote-edit
MIT License
146 stars 55 forks source link

SFTP connection issue #82

Open movence opened 9 years ago

movence commented 9 years ago

Atom Version: 1.0.0 System: Mac OS X 10.10.3 Thrown From: remote-edit package, v1.8.2

Stack Trace

Uncaught Error: EISDIR: illegal operation on a directory, read

At fs.js:591

Error: EISDIR: illegal operation on a directory, read
  at Error (native)
  at Object.fs.readSync (fs.js:596:19)
  at Object.fs.readFileSync (fs.js:428:28)
  at Object.fs.readFileSync (ATOM_SHELL_ASAR.js:369:29)
  at SftpHost.module.exports.SftpHost.getPrivateKey (/Users/someone/.atom/packages/remote-edit/lib/model/sftp-host.coffee:66:17)
  at SftpHost.module.exports.SftpHost.getConnectionStringUsingKey (/Users/someone/.atom/packages/remote-edit/lib/model/sftp-host.coffee:50:22)
  at SftpHost.module.exports.SftpHost.getConnectionString (/Users/someone/.atom/packages/remote-edit/lib/model/sftp-host.coffee:82:26)
  at /Users/someone/.atom/packages/remote-edit/lib/model/sftp-host.coffee:116:32
  at fn (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js:638:34)
  at Immediate._onImmediate (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js:554:34)
  at processImmediate [as _immediateCallback] (timers.js:369:17)

Commands

     -0:44.8.0 remote-edit:browse (div.settings-view.pane-item)
     -0:43.2.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:42.6.0 hostview:edit (atom-text-editor.editor.mini.is-focused)
     -0:32.7.0 remote-edit:browse (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-solarized-dark-syntax.theme-atom-dark-ui)
     -0:31.3.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:31 hostview:delete (atom-text-editor.editor.mini.is-focused)
     -0:26.1.0 remote-edit:new-host-ftp (atom-text-editor.editor.mini.is-focused)
     -0:11.3.0 remote-edit:browse (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-solarized-dark-syntax.theme-atom-dark-ui)
  2x -0:10.6.0 core:move-down (atom-text-editor.editor.mini.is-focused)
  2x -0:09.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:04.6.0 remote-edit:browse (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-solarized-dark-syntax.theme-atom-dark-ui)
  2x -0:04.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:03.2.0 hostview:delete (atom-text-editor.editor.mini.is-focused)
     -0:02.6.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:02.3.0 hostview:delete (atom-text-editor.editor.mini.is-focused)
     -0:00.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "solarized-dark-syntax"
    ]
  },
  "remote-edit": {
    "rememberLastOpenDirectory": true
  }
}

Installed Packages

# User
remote-edit, v1.8.2

# Dev
No dev packages

I am getting this exception when trying to connect to sftp. Is there a way to resolve this issue?

sveale commented 9 years ago

What kind of directory have you specified? Is it a true directory or a link?

movence commented 9 years ago

it is a true directory

movence commented 9 years ago

I have updated to v1.8.4 but get the same error. Any clues?

sveale commented 9 years ago

From the stack trace it seems like you're trying to use a private key as authentication, but the key you've specified is infact a directory. Is this correct?

movence commented 9 years ago

I'm using ssh-agent to forward a private key when connecting to the remote server, and the connection is a gateway connection though ProxyCommand with ssh config file.

As I connect to the server with the Host that is configured in the ssh config file, I have assumed that I could just specify the Host and user to connect. The package has been upgraded to v.1.8.10, and I am sure how to see the stack trace.

brevilo commented 8 years ago

As I connect to the server with the Host that is configured in the ssh config file, I have assumed that I could just specify the Host and user to connect.

Is that even possible? I'd say that ~/.ssh/config is ignored by all of the node.js ssh modules, right?

That said, I'm also looking for a remote-edit/sync package that supports the equivalent of "ProxyCommand" one way or another...

brevilo commented 8 years ago

Update! Since remote-sync seems to use ssh2 for SSH connections, one you could implement ProxyCommand-like connection hopping like this 👍