Skip to content

Commit 2fc5d55

Browse files
authored
docs: fix proxy_command examples to use explicit hostname:port instead of %h:%p (#542)
1 parent f4371f9 commit 2fc5d55

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,8 @@ node_modules/
5555
*.sub
5656
*.sub.run
5757
script_*.py
58+
# Job execution temporary files
59+
err
60+
log
61+
# JSON files with hash names (job state files)
62+
[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]*.json

doc/context.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ Specify the ProxyCommand directly using {dargs:argument}`proxy_command <machine[
4646
"hostname": "internal-server.company.com",
4747
"username": "user",
4848
"key_filename": "/path/to/internal_key",
49-
"proxy_command": "ssh -W %h:%p -i /path/to/jump_key jumpuser@bastion.company.com"
49+
"proxy_command": "ssh -W internal-server.company.com:22 -i /path/to/jump_key jumpuser@bastion.company.com"
5050
}
5151
}
5252
```
5353

54-
The proxy command uses OpenSSH ProxyCommand syntax. `%h` and `%p` are replaced with the target hostname and port.
54+
**Note**: Unlike OpenSSH, Paramiko's ProxyCommand requires explicit hostname and port instead of `%h:%p` placeholders. The proxy command must specify the actual target hostname and port that matches the `hostname` and `port` in the remote profile.
5555

5656
This configuration establishes the connection path: Local → Jump Host → Target Server.
5757

examples/machine/ssh_proxy_command.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"username": "user",
99
"port": 22,
1010
"key_filename": "~/.ssh/id_rsa",
11-
"proxy_command": "ssh -W %h:%p -i ~/.ssh/jump_key jumpuser@bastion.company.com"
11+
"proxy_command": "ssh -W internal-server.company.com:22 -i ~/.ssh/jump_key jumpuser@bastion.company.com"
1212
}
1313
}

0 commit comments

Comments
 (0)