3

i to prove starting telnet with this command

sudo systemctl start telnet.socket

but i comme; Failed to start telnet.socket: Unit telnet.socket not found.

So , i am little new with Linux as i have understand , the new's Linux version ,about a prozess new to start , now to use systemd . I can start telnet with

sudo /etc/init.d/xinetd start

but i want to learn how to do this with systemd, because with it i have moreeeee possibility...

I have Debian Stretch

1
  • "you've read people talking about for systems based on RedHat, Arch Linux etc. Is that correct? ", yes... Commented Mar 9, 2018 at 15:06

1 Answer 1

4

WARNING: Do not run a telnet server

Telnet is horribly insecure. Do not run a telnet server on your computer. You do not need to do this.

Instead you can use SSH. If you were specifically interested in socket activation, like xinetd does, you can still do that with SSH. Look at /lib/systemd/system/ssh.socket and [email protected].

How to run a telnet server

If you do not want to run /etc/init.d/xinet start, you could instead run systemctl start xinetd. The first command would probably do exactly the same as the second anyway. However, that is due to special code in Debian. So I agree it is good to train yourself to use the systemd tools directly, when your system is using systemd.

However, it sounds like you are interested in writing a custom telnet.socket unit, which would match the behaviour you've read people talking about for systems based on RedHat, Arch Linux etc.

The source code for the Fedora package is currently available at https://src.fedoraproject.org/rpms/telnet/tree/master

Create the following files in /etc/systemd/system/ -

telnet.socket

[Unit]
Description=Telnet Server Activation Socket
Documentation=man:telnetd(8)
    
[Socket]
ListenStream=23
Accept=true
    
[Install]
WantedBy=sockets.target

[email protected]

[Unit]
Description=Telnet Server
After=local-fs.target
    
[Service]
ExecStart=-/usr/sbin/in.telnetd
StandardInput=socket
10
  • " Don't run a telnet server on your computer. There is seriously no good reason to do so" , and a telnet-client ? Commented Mar 9, 2018 at 15:17
  • telnet client used to be a common way to connect e.g. to a web server and play with the text-based protocol. this skips the telnet-specific protocol. It may also be required for interacting with devices you have, which are old, or which used telnet because they were not intended to be at all secure and they thought it was easier for them to set up a telnet server. Commented Mar 9, 2018 at 15:22
  • I every time i ende to use telnet , stop it ...... Commented Mar 9, 2018 at 15:24
  • @567hz I would still not recommend that, but it's good that you're taking such steps. Commented Mar 9, 2018 at 15:50
  • What would you recommned me ? Commented Mar 9, 2018 at 16:48

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.