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

tunnel:single : wrong SSH syntax generated ? #178

Closed
sptfinderl opened this issue Mar 26, 2024 · 1 comment · Fixed by platformsh/legacy-cli#1435
Closed

tunnel:single : wrong SSH syntax generated ? #178

sptfinderl opened this issue Mar 26, 2024 · 1 comment · Fixed by platformsh/legacy-cli#1435

Comments

@sptfinderl
Copy link

It looks like the ssh call generated by platform tunnel:single with option --gateway-ports is incorrect.

Here is the failing call :

$ /usr/bin/platform tunnel:single -vvv  --gateway-ports --app=myapp --environment=master --project=myproject

DEBUG Determined CA bundle path: /etc/ssl/certs/ca-certificates.crt
DEBUG Loaded project from cache: myproject
Selected project: projectx (myproject)
DEBUG Loaded environments from cache
Selected environment: master (type: production)
DEBUG Loaded environment deployment from cache for environment: master
Selected app: myapp
DEBUG Selected host: myproject-master-someid--myapp@ssh.eu-x.platform.sh
Are you sure you want to open an SSH tunnel to the relationship database on the environment master (type: production)? [Y/n] y

Validated SSH configuration include file: /home/user/.platformsh/ssh/host-keys
Validated SSH configuration include file: /home/user/.platformsh/ssh/host-keys.config
Process started: 'ssh' '-n' '-N' '-L' '30000:database.internal:3306' 'myproject-master-someid--myapp@ssh.eu-x.platform.sh' '-o' 'SendEnv TERM' '-o' 'LogLevel DEBUG' '-o' 'CertificateFile /home/user/.platformsh/.session/sess-cli-default/ssh/id_ed25519-cert.pub' '-o' 'IdentityFile /home/user/.platformsh/.session/sess-cli-default/ssh/id_ed25519' '-o' 'IdentitiesOnly yes' '-o' 'UserKnownHostsFile ~/.ssh/known_hosts ~/.ssh/known_hosts2 /home/user/.platformsh/ssh/host-keys' '-o' 'yes'
command-line line 0: no argument after keyword "yes"
command-line line 0: no argument after keyword "yes"

I asked ChatG and it thinks that :

In SSH command syntax, -o is used to specify options in the format -o OptionName=value, but 'yes' appears to be provided as an option without a corresponding OptionName, leading to a syntax error in the SSH command.

@pjcdawkins
Copy link
Contributor

Thanks @sptfinderl , I think this will be the fix platformsh/legacy-cli#1435

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

Successfully merging a pull request may close this issue.

2 participants