Overv / outrun

Execute a local command using the processing power of another Linux machine.
Apache License 2.0
3.12k stars 64 forks source link

unsure how to pass ssh options #16

Open setop opened 3 years ago

setop commented 3 years ago

Hi,

First thanks for implementing such an amazing idea, I love it. I'm playing around with outrun and would like to pass extra options to ssh command.

when I use outrun --ssh '-vvv' user@host ls, it says :

usage: outrun [option...] destination command [arg...]
outrun: error: argument --ssh: expected one argument

when I use outrun --ssh 'ssh -vvv' user@host ls, it says :

2021-06-03 10:25:24,381 - ERROR - failed to run command: ssh failed: OpenSSH_8.4p1 Debian-5, OpenSSL 1.1.1k  25 Mar 2021
debug1: Reading configuration data /home/user/.ssh/config
debug1: /home/user/.ssh/config line 2: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/user/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/user/.ssh/known_hosts2'
debug2: resolving "ssh" port 22
ssh: Could not resolve hostname ssh: Name or service not know

When using debug, I get that :

2021-06-03 10:31:13,540 - DEBUG - running ['ssh', '-o', 'LogLevel=error', '-R', '31138:localhost:31138', '-R', '31828:localhost:31828', '-R', '31034:localhost:31034', '-tt', 'ssh', '-vvv', 'debian@kmsf4.zoocoop.com', 'outrun', '--remote', '--unshare', '--protocol=1.0.0', '--platform=x86_64', '--config=~/.outrun/config', '--timeout=5000', '--environment-port=31138', '--filesystem-port=31828', '--debug', '--cache-port=31034', '.', '.']

which suggest that the first syntax is the right one.

It seems that --ssh requires at least two values in quotes.

It seems to come from there but I've not been able to fix it.

It can be workaround by using --ssh '-v -v -v' for example but it is not immediate.

Overv commented 3 years ago

It looks like this is an open issue in Python's argparse module. The workaround is to use the following syntax:

outrun --ssh=-vvv user@host ls
setop commented 3 years ago

It looks like this is an open issue in Python's argparse module.

2010-07-22 22:15:36 andersk create

Almost 11 years ago.

outrun --ssh=-vvv user@host ls

Ok, I'll try that, thanks