Open warcayac opened 2 years ago
I've installed these packages:
$ pip install --upgrade pgcli $ pip install sshtunnel
I'm trying to run:
$ pgcli postgresql://someone:secret1@localhost:4567/mydb --ssh-tunnel anyone:secret2@111.222.333.444:789
I get this output:
Could not establish session to SSH gateway
Indeed I use a custom SSH key: ~/.ssh/chesu_rsa
~/.ssh/chesu_rsa
so I tried with:
$ pgcli postgresql://someone:secret1@localhost:4567/mydb --ssh-tunnel anyone:secret2@111.222.333.444:789 -i ~/.ssh/cype_rsa
or
$ pgcli postgresql://someone:secret1@localhost:4567/mydb --ssh-tunnel anyone:secret2@111.222.333.444:789 -K ~/.ssh/cype_rsa
I get these error messages respectively:
Error: No such option: -i Error: No such option: -K
How do I resolve this problem?
PS: I'm using latest version of pgcli and sshtunnel.
pgcli
sshtunnel
Make sure you don't use ProxyJump in ~/.ssh/config for the tunnel host. I have the same error and replacing ProxyJump with ProxyCommand ssh -W %h:%p fixed it.
ProxyJump
ProxyCommand ssh -W %h:%p
I've installed these packages:
I'm trying to run:
I get this output:
Indeed I use a custom SSH key:
~/.ssh/chesu_rsa
so I tried with:
or
I get these error messages respectively:
How do I resolve this problem?
PS: I'm using latest version of
pgcli
andsshtunnel
.