Command to automatically input password for pscp

前端 未结 6 894
执笔经年
执笔经年 2021-01-03 23:06

I want to copy some file to a remote Linux system from my Windows PC using pscp (from putty). I wrote a small script that call the pscp commands in this way:

6条回答
  •  Happy的楠姐
    2021-01-03 23:52

    From putty documentation

    5.2.2.6 -pw passw login with specified password

    If a password is required to connect to the host, PSCP will interactively prompt you for it. However, this may not always be appropriate. If you are running PSCP as part of some automated job, it will not be possible to enter a password by hand. The -pw option to PSCP lets you specify the password to use on the command line.

提交回复
热议问题