freechat / githubsshtest.py
K00B404's picture
Add application file
368a861
import subprocess
def test_ssh_connection(git_host):
try:
subprocess.run(["ssh", "-T", "git@" + git_host], check=True)
print("SSH connection successful")
except subprocess.CalledProcessError as e:
print("SSH connection failed:", e)
test_ssh_connection("github.com")