Using WinSCP script to change login password of a Raspberry Pi device

Advertisement

kgng97
Joined:
Posts:
1

Using WinSCP script to change login password of a Raspberry Pi device

Hi,
I am trying to write a WinSCP script to change the login password of a Raspberry Pi device.

On a PuTTY command-line console, I would type passwd and then the following:
enter the current password [which is "raspberry"]
enter the new password [say, "raspberry2"]
retype new password
How can I implement these steps in a WinSCP script?

Here is what I have in the script file (script.txt):
# Connect
open sftp://pi:raspberry@10.0.123.456/
 
# Text for changing password to be placed here.
 
# Disconnect
close
 
# Exit WinSCP
exit

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum