TIP: Click on subject to list as thread! ANSI
echo: linux
to: JOACIM MELIN
from: ALEXEY VISSARIONOV
date: 2016-04-11 07:08:00
subject: SSH to Telnet `gateway`

Good ${greeting_time}, Joacim!

10 Apr 2016 22:03:54, you wrote to All:

 JM> I'm trying to hack a simple way for my users to be able to use
 JM> SSH to login to my BBS, a BBS that only supports telnet natively.

Does it listen for incoming connections, or is it also able to run in
inetd|xinetd mode?

 JM> I tried to create a simple shell script with the telnet command
 JM> to my bbs computer

What prevents running it on the same computer? With xinetd mode, it would
provide the easiest way to get everything working.

 JM> and use that script as the shell in /etc/passwd and it works but
 JM> only if I login via telnet... If I login via SSH, I get this:
 JM> /bin/deltacity.sh: Exec format error

That's normal: the 7th field of /etc/passwd _must_ be a binary.

 JM> Anyone got some advice to give?

man sshd_config
/ForceCommand

Generally, that should look like:

Match User bbs
  PermitEmptyPasswords yes
  ForceCommand /opt/sbin/bbs --xinetd


--
Alexey V. Vissarionov aka Gremlin from Kremlin
gremlin.ru!gremlin; +vii-cmiii-cmlxxvii-mmxlviii

... god@universe:~ # cvs up && make world
--- /bin/vi
* Origin: http://openwall.com/Owl (2:5020/545)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.