I have a embedded device (Perle IOLAN+, an Ethernet to serial adaptor) that I can administer via SSH. From time to time, I need to log in and execute a command on this device. Logging in via SSH, getting an interactive shell and running the command is all smooth and works well.However, I wanted to automate the process, and have a script on my server log in and run this command for me periodically. I was testing to see if I could remote-execute via SSH and it seems I can't. The command I want to run, which works fine via interactive shell, is kill line *. On my server, I try ssh user@device_host kill line *. But the expected result does not occur. when I try ssh user@device_host uptime I don't get any output, even though uptime on in the device's interactive shell works fine. The device is not running a full, normal OS - it's some manner of embedded, striped-down *nix, with only very few commands available. I was wondering if its SSH server might not recognise remote command execution. Is there some way to check? Are pared-down SSH servers often lacking this feature?Might there be another way to remote-execute a command without going in through an interactive shell?Output of ssh with -vv is:$ ssh -vv user@remote_host uptimeOpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 51: Applying options for *debug2: ssh_connect: needpriv 0debug1: Connecting to remote_host [remote_host] port 22.debug1: Connection established.debug1: identity file /home/raven/.ssh/id_rsa type -1debug1: identity file /home/raven/.ssh/id_rsa-cert type -1debug1: identity file /home/raven/.ssh/id_dsa type -1debug1: identity file /home/raven/.ssh/id_dsa-cert type -1debug1: identity file /home/raven/.ssh/id_ecdsa type -1debug1: identity file /home/raven/.ssh/id_ecdsa-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_6.4debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9debug1: match: OpenSSH_5.9 pat OpenSSH_5*debug2: fd 3 setting O_NONBLOCKdebug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug2: kex_parse_kexinit: ---- snipped - lots of kexinit messages ----debug2: kex_parse_kexinit: first_kex_follows 0debug2: kex_parse_kexinit: reserved 0debug2: mac_setup: found hmac-md5debug1: kex: server->client aes128-cbc hmac-md5 nonedebug2: mac_setup: found hmac-md5debug1: kex: client->server aes128-cbc hmac-md5 nonedebug1: sending SSH2_MSG_KEX_ECDH_INITdebug1: expecting SSH2_MSG_KEX_ECDH_REPLYdebug1: Server host key: RSA 6c:4c:41:a3:d2:04:66:a1:e8:66:2d:35:4c:79:6a:98debug1: Host 'remote_host' is known and matches the RSA host key.debug1: Found key in /home/raven/.ssh/known_hosts:4debug1: ssh_rsa_verify: signature correctdebug2: kex_derive_keysdebug2: set_newkeys: mode 1debug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug2: set_newkeys: mode 0debug1: SSH2_MSG_NEWKEYS receiveddebug1: Roaming not allowed by serverdebug1: SSH2_MSG_SERVICE_REQUEST sentdebug2: service_accept: ssh-userauthdebug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug2: key: /home/raven/.ssh/id_rsa ((nil)),debug2: key: /home/raven/.ssh/id_dsa ((nil)),debug2: key: /home/raven/.ssh/id_ecdsa ((nil)),debug1: Authentications that can continue: publickey,password,keyboard-interactivedebug1: Next authentication method: publickeydebug1: Trying private key: /home/raven/.ssh/id_rsadebug1: Trying private key: /home/raven/.ssh/id_dsadebug1: Trying private key: /home/raven/.ssh/id_ecdsadebug2: we did not send a packet, disable methoddebug1: Next authentication method: keyboard-interactivedebug2: userauth_kbdintdebug2: we sent a keyboard-interactive packet, wait for replydebug2: input_userauth_info_reqdebug2: input_userauth_info_req: num_prompts 1Password:debug2: input_userauth_info_reqdebug2: input_userauth_info_req: num_prompts 0debug1: Authentication succeeded (keyboard-interactive).Authenticated to remote_host ([remote_host]:22).debug1: channel 0: new [client-session]debug2: channel 0: send opendebug1: Requesting no-more-sessions@openssh.comdebug1: Entering interactive session.debug2: callback startdebug2: fd 3 setting TCP_NODELAYdebug2: client_session2_setup: id 0debug1: Sending environment.debug1: Sending env LANG = en_GB.UTF-8debug2: channel 0: request env confirm 0debug1: Sending command: uptimedebug2: channel 0: request exec confirm 1debug2: callback donedebug2: channel 0: open confirm rwindow 0 rmax 32768debug2: channel 0: rcvd adjust 2097152debug2: channel_input_status_confirm: type 99 id 0debug2: exec request accepted on channel 0debug1: client_input_channel_req: channel 0 rtype exit-status reply 0debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0debug2: channel 0: rcvd eowdebug2: channel 0: close_readdebug2: channel 0: input open -> closeddebug2: channel 0: rcvd eofdebug2: channel 0: output open -> draindebug2: channel 0: obuf emptydebug2: channel 0: close_writedebug2: channel 0: output drain -> closeddebug2: channel 0: rcvd closedebug2: channel 0: almost deaddebug2: channel 0: gc: notify userdebug2: channel 0: gc: user detacheddebug2: channel 0: send closedebug2: channel 0: is deaddebug2: channel 0: garbage collectingdebug1: channel 0: free: client-session, nchannels 1Transferred: sent 2472, received 1816 bytes, in 0.8 secondsBytes per second: sent 3032.4, received 2227.7debug1: Exit status 0
SSH Remote Execution - checking server can do it?
ssh;embedded;remote