0

I am using Python/netmiko to automate ssh into a linux server and fire few commands. The catch is that this box needs a custom ssh agent running in a specific path to be used for logging in, my existing ConnectHandler which uses the default ssh agent($SSH_AUTH_SOCK)

My ConnectHandler,

   connect_params = {
        "device_type": "terminal_server",
        "host": host1,
        "username": getpass.getuser(),
        "use_keys": True,
        "allow_agent": True,
        "conn_timeout": 80,
        "banner_timeout": 80,
        "session_log": "output.txt",
    }

This works for devices which does not need a custom handler but fails for my current linux box, my path for the custom agent is '~/Library/Application Support/custom-ssh-agent/agent.sock'. Can you help in understanding how I can pass the custom ssh-agent path into connect handler?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.