Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 24, 2025

The current documentation and examples incorrectly show proxy_command using OpenSSH-style %h:%p placeholders, but Paramiko's ProxyCommand doesn't support these placeholders like OpenSSH does. This leads to connection failures when users try to use the documented examples.

Problem

The documentation in doc/context.md and example in examples/machine/ssh_proxy_command.json show:

"proxy_command": "ssh -W %h:%p -i ~/.ssh/jump_key jumpuser@bastion.company.com"

However, Paramiko's ProxyCommand expects explicit hostname and port values, not placeholders. The working tests in tests/test_ssh_jump_host.py already use the correct format:

"proxy_command": "ssh -W server:22 -i /root/.ssh/id_rsa root@jumphost"

Solution

This PR updates the documentation and examples to use the correct explicit hostname:port format that works with Paramiko:

  • Documentation: Changed example to use internal-server.company.com:22 instead of %h:%p
  • Example file: Updated ssh_proxy_command.json to match the working format
  • Added explanation: Clarified the difference between OpenSSH and Paramiko proxy command requirements
  • Cleanup: Removed accidentally committed temporary files and improved .gitignore patterns

Technical Details

The code implementation was already correct - it expects explicit hostname:port values in proxy_command and properly converts them to %h:%p for rsync compatibility when needed. Only the documentation needed fixing to match the actual working implementation.

Users can now follow the examples without encountering connection failures due to unsupported placeholder syntax.

Fixes #541.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits August 24, 2025 17:10
…d of %h:%p

Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
…d of %h:%p

Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] docs and examples for proxy_command might be wrong docs: fix proxy_command examples to use explicit hostname:port instead of %h:%p Aug 24, 2025
@Copilot Copilot AI requested a review from njzjz August 24, 2025 17:11
Copilot finished work on behalf of njzjz August 24, 2025 17:11
Copy link
Member

@njzjz njzjz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot some temp files were committed.

…gnore

Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 24, 2025

@copilot some temp files were committed.

Fixed! I've removed the accidentally committed temporary files (45ffe83b7c78ffd08fa475de2fe0425bcad0969a.json, err, log) and improved the .gitignore to prevent similar issues in the future. The commit hash is a59dd5b.

@Copilot Copilot AI requested a review from njzjz August 24, 2025 17:24
Copilot finished work on behalf of njzjz August 24, 2025 17:24
Copy link

codecov bot commented Aug 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.32%. Comparing base (f4371f9) to head (a59dd5b).
⚠️ Report is 1 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (f4371f9) and HEAD (a59dd5b). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (f4371f9) HEAD (a59dd5b)
15 14
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #542       +/-   ##
===========================================
- Coverage   60.17%   47.32%   -12.86%     
===========================================
  Files          39       39               
  Lines        3905     3905               
===========================================
- Hits         2350     1848      -502     
- Misses       1555     2057      +502     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@njzjz njzjz marked this pull request as ready for review August 24, 2025 17:43
@njzjz njzjz merged commit 2fc5d55 into master Aug 24, 2025
31 checks passed
@njzjz njzjz deleted the copilot/fix-541 branch August 24, 2025 17:43
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.

docs and examples for proxy_command might be wrong
2 participants