open sftp://gu%3DMyGatewayUser%40ServerUsername%40ServerHost:ServerPassword%4001@MainAuthenticationHost/ -hostkey="ssh-rsa 2048 longlongKey"
This almost works, but when winscp prompts for the second password it doesnt have, So, or it denies access, since I only have on my script on of the passwords, or if I take one of the passwords from the script string I have to input manually both of them (my gateway one, and the server one) And I really needed to automate some ftp file operations.
does anyone know how I could automate this authentication part ?
Below, my connection when I took both passwords (it still signals Access Denied but prompts for the second password anyway - labeled "senha" below)
Usando nome de usuário "gu=GatewayUser@ServerUsername@ServerHostName".
Usando autenticação interativa de teclado.
Please specify the requested information
Gateway password: (GatewayPassword Manually inputted)
Acesso negado. <- It didnt deny, since it asks for the second password below - it happens when I login using putty as well.
Iniciando a sessão...
Sessão ativa:  gu=GatewayUser@ServerUsername@ServerHost@AuthenticationHost
winscp> <- Logged in