How write a Windows batch file to be run from HostA for those connections below?
SSH (with local port forwarding): HostA => HostB => HostC.
HostA – HostB must use plink.exe
(HostA runs Windows)
HostB – HostC must use ssh
(HostB runs Linux).
I try this:
@echo off
chdir /d "C:\"
start plink.exe user_at_B@192.168.IP_of_B -pw userBpasswd
ssh -L user_at_C@192.168.IP_of_C
This batch script does not execute a second ssh
command (from B to C), it just opens a new CMD window in which nothing happens.
Please disregard password storage in a batch file for plink
.