V
V
vlzemtsov2017-12-07 10:27:49
JavaScript
vlzemtsov, 2017-12-07 10:27:49

How to disable ssh root access for one interface?

Good afternoon.
There is a CentOs (7.2 minimal) server.
It has 2 interfaces. (eth0 and eth1)
It is necessary to make sure that anyone can log in to eth0, without restrictions, and the root user is prohibited on eth1.
I'm thinking about the /etc/ssh/sshd_config config, in which you can specify:
PermitRootLogin no
But then root access will be denied on both interfaces.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
Alexander, 2019-09-24
@lexstile

Curly braces in JS are the Object data type , the desired values ​​in the keys means we take Object.keys(input)and list all the elements. Next, we split the text into substrings through split and go through the array, assigning values.

A
Anton Anton, 2019-09-24
@Fragster

Object.keys () will help

C
CityCat4, 2017-12-07
@vlzemtsov

Root cannot be walked. Dot.
For work outside of homework, there is su / sudo.

V
Vladimir Kuts, 2017-12-07
@fox_12

Set up two sshd instances with different interface settings and different ListenAddress options depending on your interface.

I
Ingvar, 2017-12-07
@take

Search in English. )
Simple solution, even two via sshd_config and via iptables link

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question