ssh2shell 2.0.8 → 2.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ssh2shell",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "author": "cmp-202",
5
5
  "description": "A wrapper class for ssh2 to run multiple sequential commands in an SSH shell session, handle command responses, and tunnel through to other hosts using nested host objects",
6
6
  "main": "./lib/ssh2shell.js",
@@ -44,7 +44,7 @@
44
44
  ],
45
45
  "repository": {
46
46
  "type": "git",
47
- "url": "http://github.com/cmp-202/ssh2shell"
47
+ "url": "git+ssh://git@github.com/cmp-202/ssh2shell.git"
48
48
  },
49
49
  "bugs": {
50
50
  "url": "https://github.com/cmp-202/ssh2shell/issues"
@@ -331,7 +331,8 @@ class SSH2Shell extends Stream
331
331
  sshOptions += " -i " + @sshObj.server.ssh.identityFile if @sshObj.server.ssh.identityFile
332
332
  sshOptions += " -l " + @sshObj.server.ssh.loginName if @sshObj.server.ssh.loginName
333
333
  sshOptions += " -m " + @sshObj.server.ssh.macSpec if @sshObj.server.ssh.macSpec
334
- sshOptions += ' -o "#{option}={#value}"' for option,value of @sshObj.server.ssh.Options
334
+ shellQuote = (value) -> "'" + String(value).replace(/'/g, "'\\''") + "'"
335
+ sshOptions += " -o " + shellQuote("#{option}=#{value}") for option, value of (@sshObj.server.ssh.options or {})
335
336
  sshOptions += ' -o "StrictHostKeyChecking=no"'
336
337
  sshOptions += " -p #{@sshObj.server.port}"
337
338
  @sshObj.sshAuth = false