M
M
Michael2019-07-31 14:50:24
linux
Michael, 2019-07-31 14:50:24

How to run another sshd on the same server?

Good afternoon,
There was a need to run another sftp installation on one RH server.
How to competently clone and run it on a different port without breaking the main sftp.
Different package versions on different ports.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Chernykh, 2019-07-31
@sashkets

vi /etc/ssh/sshd_config
port 22
port 2222
rc-service sshd reload

P
paran0id, 2019-07-31
@paran0id

Take the sshd unit file, most likely it will be /lib/systemd/system/sshd.service
Copy it to, for example, /etc/systemd/system/sshd_new.service
In the resulting file, write the path to the new executable file, where it lies , and config (in which a different port must be specified), like this:
Save the file, then as root:

systemctl daemon-reload
systemctl enable sshd_new
systemctl start sshd_new

And everything is ready.

T
t_q_l, 2019-08-01
@t_q_l

> but I forgot to specify that the versions of the packages should be different, now I'll edit the request.
Dockerize an SSH service

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question