| 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") | |