Skip to content

Commit 500157e

Browse files
committed
docs(remote): 协议文档写明客户端启动 ssh 时只保留 OpenSSH 需要的环境变量(S26,#2231)
1 parent 07e1401 commit 500157e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎rust/contracts/remote-workspace-protocol-v1.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ startup deadline. The lock is released when its owning descriptor closes; its
3030
inode is retained so concurrent waiters cannot lock different files. This keeps
3131
a redundant launcher from restarting an explicitly closed session.
3232

33+
When a chain starts with an SSH hop, the reference client starts `ssh` with
34+
only the local variables OpenSSH itself needs (home, user, shell, search
35+
path, temporary directory, agent socket, Kerberos and the Windows system
36+
variables), followed by its own AskPass variables. ssh sends the remote host
37+
every variable a `SendEnv` pattern names, many systems ship
38+
`SendEnv LANG LC_*`, and no command-line option can withdraw a pattern, so
39+
this is the only way to keep local locale, proxy and credential variables
40+
off the host; the server runs with the remote user's login environment.
41+
Other clients should do the same.
42+
3343
## Stream
3444

3545
1. The server writes the preamble `\nLITHE-REMOTE-PROTOCOL/1\n` once per

0 commit comments

Comments
 (0)