SFTP - Too many parameters for command 'open'

Advertisement

Sylo
Guest

SFTP - Too many parameters for command 'open'

option echo off
option batch on
option confirm off
open sftp://username:xxxxxxx@ftpsite.net/ -hostkey="ssh-rsa blah blah" -privatekey="V:\SFTP_Files\Key\odi_key.ppk" -passphrase "passphrase"
lcd "\\server\g$\SFTP_Data"
put -nopremissions -preservetime *.txt
exit

I having an issue when creating a batch file to upload files in network share. When I use the script above I get "Too many parameters for command 'open'" error or if I take out the -passphrase part it crashes when running it then gives me the message:

Authenticating with public key "imported-openssh-key".
Passphrase for key 'imported-openssh-key':

I am really struggling to get this to work. Any advise would be greatly appreciated.

Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,540
Location:
Prague, Czechia

Re: SFTP - Too many parameters for command 'open'

You are missing = after the -passphrase.

Reply with quote

Advertisement

You can post new topics in this forum