在Debian上使用SecureCRT脚本可参考以下方法:
dpkg -i
命令安装。import os
host = "your_remote_host"
username = "your_username"
password = "your_password"
command = "your_command"
os.system(f"ssh {username}@{host}")
time.sleep(2)
os.system(command)
os.system("exit")
- 也可使用Expect脚本,先安装`expect`,再编写如`securecrt_auto.sh`的脚本。
./脚本名.sh
执行。