-
Notifications
You must be signed in to change notification settings - Fork 452
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
shell/exec example #199
Comments
hi! Ssh is a great way to make a terminal app available via the network. It's also a reasonably robust way of forwarding TCP based services. So I guess that is why this exists. |
No, there is no problem with executing commands if it makes sense for your application that serves SSH. You should be responsible for handling authentication yourself to ensure that there are no security implications. There is no example yet because no one has created one.
Doing a shell/exec is not a security risk if you provide a secure authentication method in your application. The intention of this package is not to replace OpenSSH, but if you want to provide the same functionality as OpenSSH, there is no problem with that. |
If any of you are looking for how to do authentication using Linux shadow, you can see how we did it in: |
@abakum hi abakum, i use yours fork project ssh-combo to test. |
here my code: https://github.com/CHN-STUDENT/ssh/blob/master/_examples/ssh-combo/main.go i hope get more advice! |
@CHN-STUDENT Hi, look complex example of ssh client and server with certificate autorisation https://github.com/abakum/ngrokSSH |
At first sight, the obvious example that is missing is one that does what you expect SSH todo, to run the command supplied by exec, or to create a shell.
In fact I was sort of expecting that functionality to be built in, rather than being an example.
I can see there is an example that runs a docker command, and an example that runs a fixed command "top" in a pty, but nothing that would do what I would naively expect an ssh server to do by default.
Is the reason one isn't provided that it's more complicated than that, or that one just hasn't been written?
Thanks.
The text was updated successfully, but these errors were encountered: