Topic "WinSCP and busybox reboot command"

Author Message
wlarsong

Guest


Using WinSCP to upload a file then reboot the device

C:\Program Files\WinSCP>WinSCP.com /privatekey=C:\Users\willl\Desktop\synergy-ss
h2.ppk /nointeractiveinput /command "option batch abort" "option confirm off" "o
pen ""scp://dropbear@192.168.1.110:/Arm/Synergy/" "call /Arm/busybox1.19 killall
init.sh 2>&1" "put ""C:\Users\willl\Desktop\SynergyDemo" "call /Arm/busybox1.19
reboot -nfd 10 2>&1" "close" "exit"

When I run the "call /Arm/busybox1.19 reboot -nfd 10 2>&1"

It doesn't then close the connection with the "close" it instead waits and then I get the

Host is not communicating for more than 15 seconds. Still waiting...
Note: If the problem repeats, try turning off 'Optimize connection buffer size'.

Warning: Aborting this operation will close connection!
(A)bort (0 s): Abort

Two Questions

1) If i have the option batch abort option confirm off and /nointeractiveinput why and I getting this message shouldn't it just abort the connection
2) How can I run the /Arm/busybox reboot call without waiting for confirmation

Thanks
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
It looks like the connection is not properly closed, because WinSCP does seem to detect that the server went down. Can you please try the same using 5.2.2 beta and attach a complete session log?

Quote:
1) If i have the option batch abort option confirm off and /nointeractiveinput why and I getting this message shouldn't it just abort the connection

Because timeout is not an irrecoverable error (I understand that it is, in your case). That's why there's another 60 seconds interval (by default).
wlarsong

Guest


Attached is the session log with beta version 5.2.1 I could not find 5.2.2 (is it a drunk build?)

Still the same result. Can you run a command a "call" without waiting for a response or forcing a return. I know that linux can with the | command.
synergy-session.log (21.29 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.

You may try to run the reboot on background (add & at the end of the command). Anyway, I would still like to try the debug version.
_________________
Martin Prikryl
wlarsong
[View user's profile]

Joined: 2013-07-23
Posts: 1
Tried that:

C:\Program Files\WinSCP>WinSCP.com /privatekey=C:\Users\willl\Desktop\synergy-ss
h2.ppk /command "option batch abort" "option confirm off" "open ""scp://dropbear
@192.168.1.110:/Arm/Synergy/" "put ""C:\Users\willl\Desktop\SynergyDemo" "call /
Arm/busybox1.19 reboot -nfd 5&" "close" "exit"
batch abort
confirm off
Searching for host...
Connecting to host...
Authenticating...
Using username "dropbear".
Authenticating with public key "imported-openssh-key".
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] dropbear@192.168.1.110
C:\...\SynergyDemo | 2694 KiB | 131.9 KiB/s | binary | 100%
Syntax error: ";" unexpected
Connection has been unexpectedly closed. Server sent command exit status 2.
Session 'dropbear@192.168.1.110' closed.
No session.

Something about a semicolon. The device doesn't complete the reboot if I add the &
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License