ssh-config icon indicating copy to clipboard operation
ssh-config copied to clipboard

= in ProxyCommand are lost

Open roblourens opened this issue 1 year ago • 1 comments

  • Have a config that contains
Host YYYY
  HostName YYYY
  IdentityFile ~/.ssh/id_rsa
  StrictHostKeyChecking no
  UserKnownHostsFile /dev/null
  ProxyCommand ssh -i ~/.ssh/id_rsa -W %h:%p -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null XXX@ZZZ
  User XXX
  • I parse the config, .prepend to add an entry, and toString() the config

The config now looks like

Host YYYY
  HostName YYYY
  IdentityFile ~/.ssh/id_rsa
  StrictHostKeyChecking no
  UserKnownHostsFile /dev/null
  ProxyCommand ssh -i ~/.ssh/id_rsa -W %h:%p -o StrictHostKeyChecking no -o UserKnownHostsFile /dev/null XXX@ZZZ
  User XXX

the = have been removed from ProxyCommand. If I start with the command in double quotes, it doesn't remove the = but it does remove the quotes.

roblourens avatar Jul 01 '24 18:07 roblourens