{"action":"closed","issue":{"url":"https://api.github.com/repos/teambition/gulp-ssh/issues/26","labels_url":"https://api.github.com/repos/teambition/gulp-ssh/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/teambition/gulp-ssh/issues/26/comments","events_url":"https://api.github.com/repos/teambition/gulp-ssh/issues/26/events","html_url":"https://github.com/teambition/gulp-ssh/issues/26","id":102407602,"number":26,"title":"\"Error: Cannot parse privateKey: Unsupported key format\" when using id_rsa file","user":{"login":"prometheas","id":185966,"avatar_url":"https://avatars.githubusercontent.com/u/185966?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheas","html_url":"https://github.com/prometheas","followers_url":"https://api.github.com/users/prometheas/followers","following_url":"https://api.github.com/users/prometheas/following{/other_user}","gists_url":"https://api.github.com/users/prometheas/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheas/subscriptions","organizations_url":"https://api.github.com/users/prometheas/orgs","repos_url":"https://api.github.com/users/prometheas/repos","events_url":"https://api.github.com/users/prometheas/events{/privacy}","received_events_url":"https://api.github.com/users/prometheas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-21T15:46:15Z","updated_at":"2015-08-21T18:40:44Z","closed_at":"2015-08-21T18:40:44Z","body":"Hey there. I'm having a devil of a time getting `gulp-ssh` to use my ssh keys; hoping to either get the problem fixed or (perhaps more likely) be educated as to whether I'm maybe doing something bone-headed… but here's the deal.\r\n\r\nI've got these RSA ssh keys (generated using `ssh-keygen` with a passphrase), and I keep them in `~/.ssh`, like any civilized human being might. (Perms on those files are right, just to preempt that particular question — I've been using these keys for the better part of a year to breeze around into various hosts.)\r\n\r\nThe trouble is that whenever I point `gulp-ssh` to my private key and attempt to access a remote host that I routinely access successfully via cli ssh, I get the following error:\r\n\r\n```sh\r\nError: Cannot parse privateKey: Unsupported key format\r\n    at Client.connect (/vagrant/node_modules/gulp-ssh/node_modules/ssh2/lib/client.js:147:13)\r\n    at GulpSSH.connect (/vagrant/node_modules/gulp-ssh/index.js:79:15)\r\n    at GulpSSH.exec (/vagrant/node_modules/gulp-ssh/index.js:110:8)\r\n    # then it's my code, followed by node\r\n```\r\n\r\nI don't usually cut my code out, but here's my file:\r\n\r\n```js\r\nvar GulpSSH = require('gulp-ssh');\r\n\r\nvar sshConfig = {\r\n  host: 'redacted', // redacted this for obvious reasons :)\r\n  port: 22,\r\n  username: 'yanni',\r\n  privateKey: '/home/yanni/id_rsa'\r\n};\r\n\r\nvar ssh = new GulpSSH({\r\n  ignoreErrors: false,\r\n  sshConfig: sshConfig\r\n});\r\n\r\n\r\nssh.exec('touch ~/my-ssh-test.txt');\r\nssh.close();\r\n```"}}