当我尝试运行以下代码时:
import paramiko
s = paramiko.SSHClient()
s.set_missing_host_key_policy(paramiko.AutoAddPolicy())
s.connect(hostname="192.168.30.68", username="root", password="123456")
stdin, stdout, stderr = s.exec_command("sh /Application/tomcat/bin/startup.sh")
print stdout.read()
s.close()
我得到以下输出:
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
远程服务器上的tomcat未启动。有没有办法解决这个问题?