huashengdun / webssh

:seedling: Web based ssh client
https://webssh.huashengdun.org/
MIT License
4.57k stars 1.3k forks source link

[Feature Request] Cloudflare domain SSH access support #202

Open ghost opened 3 years ago

ghost commented 3 years ago

Cloudflare provides a command line tool to connect to server behind cloudflare DNS. It's equivalent to a proxy command:

ssh user@domain.com -o "ProxyCommand=/usr/local/bin/cloudflared access ssh --hostname %h"

Since ProxyCommand option may have security flaws, is it possible to provide a checkbox for this function? Thanks in advance.

huashengdun commented 3 years ago

It needs to install cloudflared daemon on both host and client machines. Is it simpler that you just deploy webssh on Cloudflare?

ghost commented 3 years ago

I know what you mean, but if the host machine cannot be connected directly, Cloudflare provides a free introspectable tunnel (like ngrok) to access it via Cloudflare network. For example, now you can access Google Colab VMs via SSH. But cloudflared seems not have a proxy option and ssh twice time may be not so convenient.

huashengdun commented 3 years ago

You can deploy webssh on Cloudflare and configure your host machine to only accept ssh requests from Cloudflare network.