NickCarneiro / remtail

tail log files from multiple remote hosts
MIT License
137 stars 5 forks source link

SSH config file parsing is broken #14

Closed NickCarneiro closed 9 years ago

NickCarneiro commented 9 years ago

Gaurav's ssh config isn't getting parsed properly. It's missing hostnames.

Something is likely wrong with the upstream ssh parsing package

Host ggmathur
  User gaurav
  HostName ggmathur.ausoff.indeed.net
  IdentityFile ~/.ssh/login
Host tst-user1
  User gaurav
  HostName tst-user1.indeed.net
  IdentityFile ~/.ssh/login
Host tst-user2
  User gaurav
  HostName tst-user2.indeed.net
  IdentityFile ~/.ssh/login
Host tst-svc1
  User gaurav
  HostName tst-svc1.indeed.net
  IdentityFile ~/.ssh/login
Host tst-svc2
  User gaurav
  HostName tst-svc2.indeed.net
  IdentityFile ~/.ssh/login
Host ausoff-releng1.ausoff.indeed.net
  ForwardAgent yes
mjpitz commented 9 years ago

Looks like the config parser we're using makes some brash assumptions about the ssh_config file format: https://github.com/CrowdProcess/node-ssh-config-parser/blob/master/index.js#L15

mjpitz commented 9 years ago

Found a bug in the merging of credentials. See commit above. Pretty much, we were always taking the remtail.json file over the ssh config rather than trying to merge the two