Help with PuttyTools
Alan Adams (2486) 1149 posts |
I’m trying to automate updates to a server that only accepts SFTP. I don’t have access to the server’s configuration. I can access it with psftp, but it prompts for a password. I’ve tried using the -pw option and the -pwfile options on the psftp command, but the result is “connection refused”. All the online help seems to require additional tools, that don’t seem to be included in the RISC OS version. Filezilla on Windows connects OK, so there does seem to be a way to pass in the password without prompting for it. Is there any way to automate this process? |
Chris Gransden (337) 1207 posts |
Using v0.77 worked OK here. Create a file called e.g. batch containing,
Create a file called e.g. pwfile containing your password on one line. Then run the psftp command,
|
Alan Adams (2486) 1149 posts |
That’s one of the many things I tried. The result is “connection refused”. It looks as though the server is rejecting any attempt to automate the password entry. BTW it also needs port 3784 to be specified. [Edit] I got it to work after reading what Sitematch did, and putting -P 3784 instead of appending it to the hostname. Appending worked elsewhere, but not, it seems, here. |
Jean-Michel BRUCK (3009) 359 posts |
I found a test site and I can access it with psftp through the command line:
this is certainly not the right method because the password and the login are readable, but that makes it possible to check the command. |
Chris Gransden (337) 1207 posts |
Appending the port number only works once you are at the psftp prompt. e.g create a batch file with these contents,
Then use the command,
|