Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

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

WinSCP is a file transfer client. It's not the right tool to automate shell commands. Although it can execute shell commands using the call command:
https://winscp.net/eng/docs/scriptcommand_call
But you won't be able to execute passwd command with it.
kgng97

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