if the target machine have ssh port open you can login through this program , its a simple SSH Login , in my case my host machine was Debian nd target machine is Metaspolitable Remember its a Linux base Program you need Linux to run that Program.
chmod +x sshlogin.py
python3 sshlogin.py
Python3 Required