This one popped up recently...
Telnet itself isn't a problem as the external port is forwarded
straight to the BBS nodes via haproxy.
However I have the situation the BBS can't natively handle SSH. So my solution has been to have any SSH session open a telnet session to the haproxy destination.
Somewhere in there, someone has managed an interactive login, and
tried to play around with things. Part of the problem is that the
account and password are no secret both are bbs.
The parameters on the telnet session include -E to disable shell
escape. And the telnet session is started from within the
bash .profile. Aside from mak ing telnet a valid shell and just
using that, I'm not sure what else to try.
Otherwise I need to find
some kind of proxy/converter to go from SSH straight to the telnet
port.
Doing this with a user account sounds like a bad idea. There are
numerous ways to restrict access, but how do you know that you
haven't overlooked something and there is another hole? E.g. enabled
port forwards could be harmful too.
The parameters on the telnet session include -E to disable shell escape. And the telnet session is started from within the bash .profile. Aside from mak ing telnet a valid shell and just using that, I'm not sure what else to try. Otherwise I need to find some kind of proxy/converter to go
Could it be that they manage to send a Ctrl-C or Ctrl-Z before the actual telnet command gets invoked?
/usr/bin/telnet. Still what do I know, maybe if they're queueing during load they get first crack.
Thanks for the rest of the pointers, I have both in place. Have to say I'm not familiar with exec, and I did have an exit on the end just in case, but now it's got the exit value on it.
Somewhere in there, someone has managed an interactive login, and tried to play around with things. Part of the problem is that the account and password are no secret both are bbs.
Otherwise I need to find some kind of proxy/converter to go from SSH straight to the telnet port.
This sounds like the best solution. Now we have only to find that
proxy ... :)
overkill for your simple use case https://github.com/moul/sshportal https://github.com/eoprede/ssh_to_telnet_proxy
Sysop: | sneaky |
---|---|
Location: | Ashburton,NZ |
Users: | 2 |
Nodes: | 8 (0 / 8) |
Uptime: | 28:48:51 |
Calls: | 2,116 |
Files: | 11,149 |
D/L today: |
312 files (10,659K bytes) |
Messages: | 952,638 |