Shell Integration SCP Doesn't Work with ssh_config Match Directives
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: 3.1.5
- OS version: 10.13.3 (17D47)com.googlecode.iterm2.plist
- Attach ~/Library/Preferences/com.googlecode.iterm2.plist here (drag-drop from finder into this window)
- Attach a debug log, if possible. Instructions at https://iterm2.com/debuglog
- Are you reporting a performance issue or a hang? Please attach a sample. Instructions at https://gitlab.com/gnachman/iterm2/wikis/HowToSample
- Are you reporting a crash? Please attach the crash log. Instructions at https://gitlab.com/gnachman/iterm2/wikis/crash-logs
Detailed steps to reproduce the problem:
- Have a configuration section like the following in .ssh/config
- Enable iTerm shell integration on client and host
- Attempt to right-click a file in ls output to download with SCP
.ssh/config Example:
Host * Match exec "ping -oqt 3 %h.dept.company.com >/dev/null 2>&1" Hostname %h.dept.company.com
What happened: SCP fails with log messages like:
Feb 16 13:29:59 MyMac iTerm2[94197]: NMSSH: libssh2 (v1.7.0) initialized
Feb 16 13:29:59 MyMac iTerm2[94197]: NMSSH: Start %h.dept.company.com resolution
Feb 16 13:29:59 MyMac iTerm2[94197]: NMSSH: Unable to resolve host %h.dept.company.com
Feb 16 13:29:59 MyMac iTerm2[94197]: NMSSH: Failure establishing socket connection
Feb 16 13:29:59 MyMac iTerm2[94197]: NMSSH: Disconnected
What should have happened:
%h.dept.company.com should resolve to typed-short-hostname.dept.company.com if "ping -oqt 3 typed-short-hostname.dept.company.com >/dev/null 2>&1" returns with success and SCP should be successful.