Questions tagged [remote-execution]

105 questions
1404
votes
24 answers

How to use SSH to run a local shell script on a remote machine?

I have to run a local shell script (windows/Linux) on a remote machine. I have SSH configured on both machine A and B. My script is on machine A which will run some of my code on a remote machine, machine B. The local and remote computers can be…
Arun
31
votes
7 answers

SSH Command Execution Hangs, although interactive shell functions fine

When I attempt to execute a command on a remote server with ssh, the ssh command hangs after the exec request accepted debug message, and eventually times out. The failing command: ssh -v -v @ uptime (also tried echo hello…
Robert Muil
  • 2,948
  • 1
  • 24
  • 30
26
votes
1 answer

SSH error when executing a remote command: "stdin: is not a tty"

I'm trying to connect to machine one with ssh and then connect to another machine two with ssh. But get this error: ssh user@computerone.com 'ssh otheruser@computertwo.com' stdin: is not a tty
Jhonathan
  • 1,611
  • 2
  • 13
  • 24
19
votes
10 answers

Execute python code inside browser without Jython

Is there a way to execute python code in a browser, other than using Jython and an applet? The execution does not have to deal with anything related to graphics. For example, just sum all the digits of a binary 1Gb file (chosen by the browser user)…
proportional
  • 560
  • 1
  • 7
  • 11
14
votes
2 answers

PHP - Is this a safe way to allow user-supplied regular expressions

I would like to allow small user-defined regular expressions to be submitted for testing. However, there are many problems to consider from run-away server usage to more evil eval() usage. To my knowledge I have handled all the problems I could…
Xeoncross
  • 55,620
  • 80
  • 262
  • 364
13
votes
1 answer

Passing PowerShell variables into a script block

I am trying to take PowerShell variables and apply them to a script block. param( [string]$username = $(throw "Blackberry Admin User Name is required"), [string]$password = $(throw "Blackberry Admin Password is required"), [string]$u =…
Colm Blake
  • 133
  • 1
  • 2
  • 7
11
votes
3 answers

OutOfMemory Exception on remote execution using Powershell Invoke-Command

I am trying to execute an exe on a remote computer using invoke-command. Executing the exe on the remote machine after logging into the machine using remote desktop takes 1GB of memory and executes to completion after a minute. Whereas when I…
manukranthk
  • 119
  • 1
  • 4
7
votes
5 answers

How do I copy a python function to a remote machine and then execute it?

I'm trying to create a construct in Python 3 that will allow me to easily execute a function on a remote machine. Assuming I've already got a python tcp server that will run the functions it receives, running on the remote server, I'm currently…
Hugh
  • 71
  • 2
6
votes
2 answers

Distributed Application in Android

I am trying to partition an android application in order to execute it partially in on the phone, and partially on the server (the server could have an emulator run in it). I have read that RMIs are not supported by android. I am thinking of doing…
myself
  • 71
  • 1
  • 3
5
votes
1 answer

How do you execute a command on a remote system insde a BASH script?

As part of an intricate BASH script, I'd like to execute a command on a remote system from within the script itself. Right now, I run the script which tailors files for the remote system and uploads them, then through a ssh login I execute a single…
Jamie
  • 7,075
  • 12
  • 56
  • 86
5
votes
5 answers

LSL communications

Years ago I created a programming collaboratory in Diversity University MOO -- a room written in MOOcode that used TCP/IP to communicate with a perl server back at my campus to compile and execute C, Perl, Bash and other programs and return results…
dick.seabrook
4
votes
3 answers

Terraform stucks when instance_count is more than 2 while using remote-exec provisioner

I am trying to provision multiple Windows EC2 instance with Terraform's remote-exec provisioner using null_resource. $ terraform -v Terraform v0.12.6 provider.aws v2.23.0 provider.null v2.1.2 Originally, I was working with three remote-exec…
4
votes
1 answer

ssh remote command not working as expected (problems with read)

I have a script on my server named test.sh: #!/bin/bash read -p "Select an option [1-4]: " option echo "You have selected $option" When I run it through ssh manually, I see this: me@me:~$ ssh root@server root@server's password: [...] root@server:~#…
user619271
  • 4,766
  • 5
  • 30
  • 35
4
votes
1 answer

How can I make pycharm remote execution use the system environment variables?

I'm using pycharm remote execution to run scripts on a remote server. I saw that bash_profile (or other start up scripts) aren't executed - is there a way to make this happen? preferably not in 'run configurations' which are needed for each script…
Ophir Yoktan
  • 8,149
  • 7
  • 58
  • 106
3
votes
2 answers

how to pass parameters to Powershell script and run it on a remote computer

I am trying to pass 2 parameters to a PS script which will patch the SQL Server on a remote machine. Here is the code i used : $Patcher = "\\remoteShareLocation\SQLpatcher.ps1" $ver = "SQL2012" $inst = "NEWINST" Invoke-Command -ComputerName…
user3180704
  • 119
  • 3
  • 8
1
2 3 4 5 6 7