Skip to content

Conversation

@dapimentel
Copy link

Thank you for this gem of a tool; however, in the event a user's ~/.ssh/config file contains multiple copies of the same ControlPath pattern across multiple remote host configurations, some additional filtering must occur within the config_control_path() function. If this additional filter is rejected, then such config file content will result in the following warning from the host_from_socket() function:

 ${YLW}WARNING: cannot match host from socket name${RST}

For example, consider the following ~/.ssh/config content with a repeated ControlPath pattern:

Host host1*
  PKCS11Provider /usr/lib64/opensc-pkcs11.so
  Hostname host1.example.com
  User arthur
  ControlMaster auto
  ControlPath ~/.ssh/sockets/%r@%h::%p
  ControlPersist 10h

Host rz*
  Hostname my-gate.example.com
  User arthur
  ControlMaster auto
  ControlPath ~/.ssh/sockets/%r@%h::%p
  ControlPersist 10h
  RequestTTY force

Host rzremote*
  RemoteCommand /home/arthur/passthru.sh rzremote.example.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant