Hey I have following python code:
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
# Connect to the Linux server
ssh.connect(hostname="name", username="root", password="password", port=22)
#if file exists it should be removed first
ssh.exec_command("rm name")
sftp = ssh.open_sftp()
#create file & add minecraft username to file
f = sftp.open("name", "w")
f.write(user)
f.close()
#run bash file, which will whitelist user
stdin, stdout, stderr = ssh.exec_command('./whitelist.sh')
sftp.close()
ssh.close()
This code is working on my home pc, but on my windows server the code dont execute "./whitelist.sh". I dont get a error message or something like that What is the reason for that and how can i fix it?