Thread: [Other] putty ssh reconnection
View Single Post
  #3  
Old 01.08.2021, 12:18
thecoder2012's Avatar
thecoder2012 thecoder2012 is offline
Official 9kw.eu Support
 
Join Date: Feb 2013
Location: Internet
Posts: 1,306
Default

Putty docs are very helpful in this case.

Quote:
Originally Posted by farna1000 View Post
but i get error.
if i delete 2 line reboot, it open putty then login into ssh but dont make command.
How to do?
"reboot" is NO command-line command for YOUR computer in this case.

You can try only the command "-m" and "-t" with putty in this case.
putty.exe -ssh login.example.tld -m "c:\path\cmd.txt" -t

Create a file "cmd.txt" with "reboot" as content.

Quote:
Originally Posted by farna1000 View Post
Someone can help me please?
Or try plink as a command-line interface to the PuTTY back ends. It's usually in your putty package or download it from the official putty site. Alternatively use KiTTY with its -cmd switch, that does what you want (and does not need a temporary file).

Automated connection:
plink mysession reboot

Interactive login:
plink -l USER -pw TEST -ssh login.example.tld reboot

If JDownloader 2 has problems with the commands then create a batch file (*.bat).
All commands are untested.
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep.
Reply With Quote