moul / sshportal

:tophat: simple, fun and transparent SSH (and telnet) bastion server
https://manfred.life/sshportal
Apache License 2.0
1.77k stars 132 forks source link

SSHPortal V2 🥈 #210

Open moul opened 4 years ago

moul commented 4 years ago

👋 I plan to start the v2 of sshportal.

For now, I mostly have developer-oriented ideas of enhancement, that should allow making the project easier to work on.

About the usage, I will try to limit as much as possible the retro-compatibility breaking. I also plan to write the migration that will allow keeping the current database.

Please, do not hesitate to add your thoughts if you have ideas for improvements or specific wishes.

Thank you for your support, and take care of you.


Checklist (based on my ideas and the comments below)

Targets:

jle64 commented 4 years ago

Hey nice to see this features being worked on, in particular the api and web ui.

At $WORK we have a internal small python web ui / rest api over sshportal that we made for our internal needs, so I'm listing them in case that can inspire you (from our point of view it would be great if they were built-in so we could ditch our custom stuff):

Also for session replay we have had good results using tty-player.js.

bozzo commented 3 years ago

built-in system monitoring (disk space, memory), send warnings

Did you also plan to add metrics to monitor the app behaviour and expose them outside SSH Portal? for example, SSH Portal could expose, in Prometheus format, the active connection count per host, the active connection count per user, errors count per host, access denied ... This can be useful to detect suspicious activity.

jeanlouisferey commented 3 years ago

Awsome, a lot of interesting propositions !

At $WORK we made an Ansible role to manage SSHPortal resources (user, host, hostgroup, ...) and of course, it could be very useful to have an API to interact with SSHPortal instead of ssh communication. We are thinking to open source this Ansible role.

This Ansible role send directly by email the "SSHPortal invite" to the newly created user.

Maybe it could be an new feature for SSHPortal V2:

jeanlouisferey commented 3 years ago

It could be useful, through configuration parameters, to modify ssh crypto parameters ?

I tried to find myself the answer in https://pkg.go.dev/golang.org/x/crypto/ssh but as Go is not my mother tongue, I'm not sure. Maybe with https://godoc.org/golang.org/x/crypto/ssh#Config

For example, with Opensshd, we can modify some parameters :

With these parameters, it is possible to enforce ssh server configuration to follow some common SSH secure use recommendations (like the ANSSI one)

For example, when I try to audit my SSHPortal instance with ssh-audit, ssh-audit notes some weaknesses in the different algorithms used

Grounz commented 3 years ago

It could be useful to have a REST/API for configure sshportal with ANSIBLE. Today we have a ansible rôle for that but it's so tricky, we use shell module and he is not idempotent. I can help you you code a rest/api.

Grounz commented 3 years ago

Hi,

for system monitoring metrics, it's possible to use prometheus exporter go library for expose a /metrics api ? And will be possible to scrape it with prometheus .

NoxInmortus commented 3 years ago

Hello @jeanlouisferey @Grounz

Is your ansible role public ? It would be immensely appreciated

jeanlouisferey commented 3 years ago

Hello @NoxInmortus, Today, our Ansible role is not public. I planed to open source it, but I didn't take time to do it. I need to clean some parts of code and make a real documentation before.

FaraFara commented 2 years ago

Hello @jeanlouisferey!

..... We are thinking to open source this Ansible role....

Can you show some things? One year is gone... :) Thanx!

WladyX commented 8 months ago

Is this project still alive? Just found it and looks really, really cool! Thank you for sharing it and hope there will be a V2 :)

libvoid commented 8 months ago

@WladyX

This project is no longer maintained. You may take a look at our fork which is up to date and includes multiple security improvements / fixes but keep in mind that our fork is on MAINTENANCE mode and only security issues and major bugs will be fixed. We don't plan to add and accept new features.

Honestly, you should consider choosing another SSH bastion :

WladyX commented 8 months ago

Will take a look at the alternatives. Thank you @libvoid !