execute a remote script from local script with ssh

I'm trying to execute a remote script from local script by ssh. If I do these from command line (local) works:

ssh [email protected] <<'ENDSSH' /path_to_script/scrip.sh value ENDSSH 

But when I put these in a sh from my local machine it says me:

Pseudo-terminal will not be allocated because stdin is not a terminal. ssh_exchange_identification: Connection closed by remote host 

Someone could help me? Thanks!


Try this:

ssh [email protected] ""/usr/bin/sh /path_to_script/scrip.sh vaule"

Category: ssh Time: 2016-07-29 Views: 0
Tags: ssh

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.318 (s). 12 q(s)