Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unsure how to pass ssh options #16

Open
setop opened this issue Jun 3, 2021 · 2 comments
Open

unsure how to pass ssh options #16

setop opened this issue Jun 3, 2021 · 2 comments

Comments

@setop
Copy link

setop commented Jun 3, 2021

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
Copy link
Owner

Overv commented Jun 13, 2021

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
Copy link
Author

setop commented Jun 14, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants