Skip to content

Paramiko

Paramiko is a pure-Python 1 (3.6+) implementation of the SSHv2 protocol 2, providing both client and server functionality. It provides the foundation for the high-level SSH library Fabric, which is what we recommend you use for common client use-cases such as running remote shell commands or transferring files.

SSH Agent 실행여부 확인

SSH_AGENT_PID 같은 환경변수로 확인할 수 없을 경우, 내부적으로 paramiko를 사용하므로 이걸로 확인하자.

def is_valid_sagecipher() -> bool:
    from paramiko import Agent

    return bool(Agent().get_keys())

See also

  • Sagecipher (SSH Agent 확인 용도로 사용한다)

Favorite site