简体   繁体   English

用于登录的Shell脚本

[英]Shell scripting for login

Is there any way to login to another machine specifying the password in the script itself?? 有什么方法可以登录到另一台在脚本本身中指定密码的计算机?

SSH-keygen wont work for me so i need to specify it in the script SSH密钥对我不起作用,因此我需要在脚本中指定它

  #!/bin/sh

    ssh root@201.1.192.21 mysqldump -uroot -pxxxxxx > backup/a.sql

您可以使用Expect

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM