MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / SshAgentInfoCommand

Class SshAgentInfoCommand

keepercommander/commands/ssh_agent.py:824–835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

822
823
824class SshAgentInfoCommand(Command):
825 def get_parser(self):
826 return ssh_agent_info_parser
827
828 def execute(self, params, **kwargs):
829 if isinstance(params.ssh_agent, SshAgentContext):
830 print('{0:>20s}: {1}'.format('Status', 'Running' if params.ssh_agent.is_running else 'Stopped'))
831 if params.ssh_agent.is_running:
832 print('{0:>20s}: {1}'.format('Loaded Keys', len(params.ssh_agent.keys)))
833 print(f'\nSSH_AUTH_SOCK={params.ssh_agent.path}; export SSH_AUTH_SOCK;')
834 else:
835 print('{0:>20s}: {1}'.format('Status', 'Stopped'))
836
837
838class SshAgentStartCommand(Command):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected