sosedoff / pgweb

Cross-platform client for PostgreSQL databases
https://sosedoff.github.io/pgweb
MIT License
8.63k stars 732 forks source link

[Feature request] configure ssh tunnel via command line options #318

Closed tylerlong closed 6 years ago

tylerlong commented 6 years ago

Add the following application options:

--ssh-host=            SSH Server hostname or IP
--ssh-port=            SSH Server port (22)
--ssh-user=            SSH user
--ssh-pass=            Password for SSH user
--ssh-key=             SSH key
tylerlong commented 6 years ago

I just find that it is possible to use the bookmark feature to let command line support ssh tunnel.

sosedoff commented 6 years ago

We could even reduce number of CLI options (which has grown a bit) by using a single option to pass the host/port/user/pass like this:

--ssh=user:password@host:port

I dont use SSH with pgweb directly, only via bookmarks, so let me know what you think.

tylerlong commented 6 years ago

We could even extend the url option:

--url=postgresql://user:pass@host:port/db?sslmode=sslmode#ssh://user:pass@host:port?sshkey=~/.ssh/id_rsa

I am also OK with --ssh=user:password@host:port?sshkey=~/.ssh/id_rsa

The feature is already there, we should expose the feature via command line.

sosedoff commented 6 years ago

Closing due to no activity.