Goal: connect to AntMiner via SSH, and send poweroff
command.
command: plink.exe -v -t -ssh antminer -l root -pw xxx poweroff
Connecting to 10.0.1.11 port 22
We claim version: SSH-2.0-PuTTY_Release_0.70
Server version: SSH-2.0-dropbear_2012.55
Using SSH protocol version 2
Using Diffie-Hellman with standard group "group14"
Doing Diffie-Hellman key exchange with hash SHA-1
Host key fingerprint is:
ssh-rsa 1039 xxx
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username "root".
Sent password
Access granted
Opening session as main channel
Opened main channel
Allocated pty (ospeed 38400bps, ispeed 38400bps)
Started a shell/command
sh: poweroff: not found
Server sent command exit status 127
Disconnected: All channels closed
So the connection is working fine, it's the sending of the command that goes wrong. Here's what SHOULD happen: (sent the command manually this time)
command: plink.exe -v -t -ssh antminer -l root -pw xxx
Connecting to 10.0.1.11 port 22
We claim version: SSH-2.0-PuTTY_Release_0.70
Server version: SSH-2.0-dropbear_2012.55
Using SSH protocol version 2
Using Diffie-Hellman with standard group "group14"
Doing Diffie-Hellman key exchange with hash SHA-1
Host key fingerprint is:
ssh-rsa 1039 xxx
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username "root".
Sent password
Access granted
Opening session as main channel
Opened main channel
Allocated pty (ospeed 38400bps, ispeed 38400bps)
Started a shell/command
root@antMiner:~# poweroff
Broadcast message from root@antMiner (pts/0) (Thu Jan 25 19:23:19 2018):
The system is going down for system halt NOW!
root@antMiner:~# Server unexpectedly closed network connection
FATAL ERROR: Server unexpectedly closed network connection
Anybody have any idea WHY the sending of the command "poweroff" over plink fails?