Provide password to ssh command inside bash script, Without the usage of public keys and Expect

前端 未结 4 950
被撕碎了的回忆
被撕碎了的回忆 2021-02-04 03:08

I want to use SSH inside a script, but this script is not going to be executed on my machine.

In my implementation there are two limitations.

4条回答
  •  长情又很酷
    2021-02-04 03:28

    AFAIK there is no possibility beside from using keys or expect if you are using the command line version ssh. But there are library bindings for the most programming languages like C, python, php, ... . You could write a program in such a language. This way it would be possible to pass the password automatically. But note this is of course a security problem as the password will be stored in plain text in that program

提交回复
热议问题