Unix & Linux Asked by aisbaa on February 13, 2021
When I connect to the remote machine SSH_AUTH_SOCK
gets set to /tmp/ssh-RANDOM_HASH/agent.PID
. Is it possible to configure sshd
to use different location for SSH_AUTH_SOCK
. I would like to use /tmp/ssh/RANDOM_HASH/agent.PID
instead.
I dug a little in the code and found that path pattern (auth_sock_dir) is hardcoded and the function (auth_input_request_forwarding) is marked as static. So theres is no way to set a different pattern in config and there is no way to preload a different function.
Correct answer by aisbaa on February 13, 2021
It is actually ssh-agent
that sets the SSH_AUTH_SOCKET
environment variable. You can use the -a
option when you start ssh-agent
to put the socket somewhere other than the default (and SSH_AUTH_SOCK
will be set accordingly). However, the pattern that is used to construct the socket name is hardcoded, and you won't be able to change the default location without modifying the ssh-agent
source code.
Answered by patbarron on February 13, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP