{"action":"created","issue":{"url":"https://api.github.com/repos/shipitjs/shipit/issues/190","repository_url":"https://api.github.com/repos/shipitjs/shipit","labels_url":"https://api.github.com/repos/shipitjs/shipit/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/shipitjs/shipit/issues/190/comments","events_url":"https://api.github.com/repos/shipitjs/shipit/issues/190/events","html_url":"https://github.com/shipitjs/shipit/issues/190","id":316612063,"number":190,"title":"deploy:update connection refused","user":{"login":"mitchtreece","id":12143432,"avatar_url":"https://avatars2.githubusercontent.com/u/12143432?v=4","gravatar_id":"","url":"https://api.github.com/users/mitchtreece","html_url":"https://github.com/mitchtreece","followers_url":"https://api.github.com/users/mitchtreece/followers","following_url":"https://api.github.com/users/mitchtreece/following{/other_user}","gists_url":"https://api.github.com/users/mitchtreece/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchtreece/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchtreece/subscriptions","organizations_url":"https://api.github.com/users/mitchtreece/orgs","repos_url":"https://api.github.com/users/mitchtreece/repos","events_url":"https://api.github.com/users/mitchtreece/events{/privacy}","received_events_url":"https://api.github.com/users/mitchtreece/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-22T20:48:56Z","updated_at":"2018-04-23T15:07:33Z","closed_at":null,"author_association":"NONE","body":"Been banging my head against the wall trying to figure out why I can't get this working. I'm convinced this must be a bug with how `ssh-pool` is opening connections with the remote server. Every time I attempt to deploy, I'm met with the following error:\r\n\r\n```\r\n'deploy:update' errored after 20 s\r\nError: Command failed: ssh user@myhost \"echo \\\"74ad4f770102875ded99dcc781d8c3100cf12c5a\\\" > /var/apps/app/releases/20180422202738/REVISION\"\r\nssh: connect to host myhost port 22: Connection refused\r\n\r\nat ChildProcess.exithandler (child_process.js:273:12)\r\nat ChildProcess.emit (events.js:180:13)\r\nat maybeClose (internal/child_process.js:936:16)\r\nat Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)\r\n```\r\n\r\nYes, the environment is setup correctly with keys. I can ssh manually to my server (with the same user that shipit is using), and ssh'ing from the server to itself also works without any issues.\r\n\r\nAfter setting the `sshd` log level to verbose & inspecting my server's auth log (`/var/log/auth.log`), I noticed that shipit's ssh attempts succeed, but are then immediately closed by the client (not the server):\r\n\r\n```\r\nApr 22 20:27:38 api sshd[13276]: Accepted publickey for user from <IP_ADDRESS> port 51536 ssh2: RSA SHA256: ---\r\nApr 22 20:27:38 api sshd[13276]: pam_unix(sshd:session): session opened for user user by (uid=0)\r\nApr 22 20:27:38 api systemd-logind[1384]: New session 621 of user user.\r\nApr 22 20:27:38 api sshd[13308]: Received disconnect from <IP_ADDRESS> port 51536:11: disconnected by user\r\nApr 22 20:27:38 api sshd[13308]: Disconnected from <IP_ADDRESS> port 51536\r\nApr 22 20:27:38 api sshd[13276]: pam_unix(sshd:session): session closed for user user\r\nApr 22 20:27:38 api systemd-logind[1384]: Removed session 621.\r\n```\r\n\r\nAlso, while trying to get to the source of this issue, it occurred to me that supporting ssh verbosity levels (`-v`, `-vv`, `-vvv`) would be an extremely useful feature. Are there any plans to add those in the future?"},"comment":{"url":"https://api.github.com/repos/shipitjs/shipit/issues/comments/383609360","html_url":"https://github.com/shipitjs/shipit/issues/190#issuecomment-383609360","issue_url":"https://api.github.com/repos/shipitjs/shipit/issues/190","id":383609360,"user":{"login":"mitchtreece","id":12143432,"avatar_url":"https://avatars2.githubusercontent.com/u/12143432?v=4","gravatar_id":"","url":"https://api.github.com/users/mitchtreece","html_url":"https://github.com/mitchtreece","followers_url":"https://api.github.com/users/mitchtreece/followers","following_url":"https://api.github.com/users/mitchtreece/following{/other_user}","gists_url":"https://api.github.com/users/mitchtreece/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchtreece/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchtreece/subscriptions","organizations_url":"https://api.github.com/users/mitchtreece/orgs","repos_url":"https://api.github.com/users/mitchtreece/repos","events_url":"https://api.github.com/users/mitchtreece/events{/privacy}","received_events_url":"https://api.github.com/users/mitchtreece/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T15:07:33Z","updated_at":"2018-04-23T15:07:33Z","author_association":"NONE","body":"Here's my configuration if that helps. I replaced some of the specific values with generic ones 😄 \r\n\r\n```\r\nshipit.initConfig({\r\n\r\n    default: {\r\n        workspace: '/tmp/app',\r\n        deployTo: '/var/apps/app-dev',\r\n        repositoryUrl: ...,\r\n        branch: 'dev',\r\n        servers: [{\r\n            host: 'myhost.com',\r\n            user: 'user'\r\n        }],\r\n        ignores: ['.git', 'node_modules'],\r\n        keepReleases: 5,\r\n        deleteOnRollback: true,\r\n        shallowClone: true,\r\n    },\r\n\r\n    development: {\r\n        // Same as 'default'\r\n    },\r\n\r\n    production: {\r\n        deployTo: '/var/apps/app',\r\n        branch: 'master'\r\n    }\r\n\r\n})\r\n```"}}
{"actor":{"display_login":"mitchtreece"}}