I need to run some ssh commands on my linux server, from a windows machine via cmd.
For this I am using plink.exe
Command:
plink -ssh [email protected] -pw 12345 -m script
Script:
pg_dump -U master dados -v -Fc -f /sistema/dados/dados.bak
This command works normally when I use native commands in the script, such as cp
, mv
, etc.
For commands such as pg_dump
, pg_restore
, createdb
, it says that the command was not found.
PS: The same happens with putty.exe by windows cmd.