GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
RESOCK(1) FreeBSD General Commands Manual RESOCK(1)

resock
connect to a usable SSH authentication agent

resock

The resock utility attempts to connect to an SSH authentication agent by looking for its Unix-domain socket in the /tmp/ssh-* directories. It looks for agent sockets in a directory owned by the current user and outputs the name of the most recently created one in the hope that it would be actually active at the present time.

The output of the resock utility is in the format suitable for direct use by the eval command of Bourne-like shells. Its main intended purpose is to be able to easily connect to the new SSH agent socket after reconnecting to e.g. a screen(1) session on a remote host, since the environment of the processes running in the screen session will contain an incorrect outdated value for the SSH_AUTH_SOCK environment variable (as it was at the time of the creation of the screen session).

The resock utility exits 0 on success, and >0 if an error occurs.

The resock utility's operation is currently not directly affected by its environment.

The resock utility examines the /tmp/ssh-* directories and looks for Unix-domain sockets named agent.*.

Set the appropriate environment variables for the currently active SSH agent:

eval `resock`

ssh-add(1)

The resock utility was written by Peter Pentchev in 2010.

Peter Penchev ⟨roam@ringlet.net⟩

*
always looks for the most recent agent socket, which might not really be alive (the agent process itself may have been killed before cleaning up); should attempt to actually connect to the agent.
*
always uses the output of whoami(1) as the owner of the agent socket; maybe there should be more heuristics (check the validity, try the USER or LOGIN environment variables) or even an -u command-line option.
October 10, 2013 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.