How do you enter a password

Advertisement

Guest

How do you enter a password

Hi
I am really really new to this and but I am trying to write a script that will untimely sync some files between some networking equipment and my desktop...
this is what I get in the log file...
Searching for host...
Connecting to host...
Authenticating...
Username: Password: 
Connection has been unexpectedly closed. Server sent command exit status 0.
Authentication failed.

this is what my Script looks like
open scp:192.168.1.21 -hostkey="ssh-rsa 1040 OPnZrsdw14pOWRif......."
<my switch>
<password>
cd /tmp
ls
put c:\junk\test.txt
ls
close
exit
this is how I start the script
[code]@batch@
"C:\Program Files (x86)\WinSCP\winscp.com" /ini=nul /script=c:\junk\testscr.txt >log.txt
[/cide]

What I am doing wrong... I do not know how to deal with the password....
any other suggestions would be welcome

thanks
Gary

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
34,943
Location:
Prague, Czechia

Re: How do you enter a password

open scp://username:password@192.168.1.21 -hostkey="ssh-rsa 1040 OPnZrsdw14pOWRif......."

Reply with quote

Advertisement

You can post new topics in this forum