bugzilla-daemon at bugzilla.mindrot.org
2017-Feb-15 17:52 UTC
[Bug 2677] New: Provide a way to set an environment variable from ssh_config
https://bugzilla.mindrot.org/show_bug.cgi?id=2677 Bug ID: 2677 Summary: Provide a way to set an environment variable from ssh_config Product: Portable OpenSSH Version: 7.4p1 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 Component: ssh Assignee: unassigned-bugs at mindrot.org Reporter: sascha-openssh-bugs at silbe.org For various purposes it's useful to pass some more or less fixed string from the client to the server side. E.g. when forwarding sockets, the remote socket name needs to include some string unique to the local side (like the host name) to avoid collisions between connections from different hosts. Think gpg-agent forwarding or using emacsclient on the remote host to open the file (via TRAMP) on the local host. This is currently possibly by using a wrapper script around ssh that sets some environment variable, but setting an environment variable directly in ssh_config would make things a lot smoother (no messing with PATH required). Being able to expand environment variables and use expansions like in the Match directive would be nice, but even a fixed string would go a long way. E.g.: === Begin .ssh/config ==Host *.localdomain SetEnv EMACS_SOCKET=/home/sascha/.emacs.d/server/server.%l SetEnv GPG_AGENT_INFO=/home/sascha/.gnupg/S.gpg-agent.%l:1:1 Host myserver.localdomain RemoteForward /home/sascha/.emacs.d/server/server.mydesktop:/tmp/emacs8193/server RemoteForward /home/sascha/.gnupg/S.gpg-agent.mydesktop:/home/sascha/.gnupg/S.gpg-agent === End .ssh/config == (As you can see, environment variables and Match-like expansions would be useful in RemoteForward as well, but that's a feature request for another day). -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Jun-09 03:20 UTC
[Bug 2677] Provide a way to set an environment variable from ssh_config
https://bugzilla.mindrot.org/show_bug.cgi?id=2677 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |2852 CC| |djm at mindrot.org --- Comment #1 from Damien Miller <djm at mindrot.org> --- ssh_config (and sshd_config) now have a SetEnv option that does just this. Referenced Bugs: https://bugzilla.mindrot.org/show_bug.cgi?id=2852 [Bug 2852] Tracking bug for OpenSSH 7.8 release -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Jun-09 03:20 UTC
[Bug 2677] Provide a way to set an environment variable from ssh_config
https://bugzilla.mindrot.org/show_bug.cgi?id=2677 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |drescher at inter.net --- Comment #2 from Damien Miller <djm at mindrot.org> --- *** Bug 2875 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Jun-09 03:20 UTC
[Bug 2677] Provide a way to set an environment variable from ssh_config
https://bugzilla.mindrot.org/show_bug.cgi?id=2677 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Jul-07 09:56 UTC
[Bug 2677] Provide a way to set an environment variable from ssh_config
https://bugzilla.mindrot.org/show_bug.cgi?id=2677 --- Comment #3 from Sascha Silbe <sascha-openssh-bugs at silbe.org> --- Thanks! Does the current implementation support keyword expansion? The man page doesn't say and I couldn't see any expansion happening in the code (but I may have overlooked it). I'm using the same SSH config on multiple hosts so being able to expand the local hostname (%l, like in my example above) would be really useful. -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2021-Apr-23 05:00 UTC
[Bug 2677] Provide a way to set an environment variable from ssh_config
https://bugzilla.mindrot.org/show_bug.cgi?id=2677 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #4 from Damien Miller <djm at mindrot.org> --- closing resolved bugs as of 8.6p1 release -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
Maybe Matching Threads
- [Bug 2714] New: Allow specifying a key description when loading from stdin
- [Bug 2713] New: Please provide a StrictModes-like setting (command line parameter) for ssh (client)
- [Bug 701] With 'PermitRootPassword without-password' set, root w/pass can still log in with a using 'keyboard-int/pam'
- [Bug 1285] provide fallback options /etc/ssh/ssh_config
- openssh 3.1p1 & autoconf 2.53