S
S
sapki2018-09-06 12:36:21
linux
sapki, 2018-09-06 12:36:21

Two network cards on an Ubuntu server. How to set a card for SSH access?

Hey!
There is a Zabbix server on Ubuntu Server 16.04. The PC has two network cards (enp3s0, enp4s0). Connected to the same switch in different vlans. Screenshot configuration. 5b90f2eec791d261880518.png
It is important to get access via SSH on the IP of the first card (10.44.243.252), with these settings, only 10.44.241.75 enters. I tried different settings, commented on the gateway of the second card - to no avail. The PC has an address from the 10.44.241.x subnet, but routes to the 10.44.243.x subnet are registered and, when the second card is inactive, it successfully connects via SSH to the address of the first card. Already broke my head, I don’t understand what’s the matter ..
ip route, just in case:
5b90f4045f0ce984310884.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pfg21, 2018-09-06
@pfg21

$man ssh_config

ListenAddress
 Specifies the local addresses sshd(8) should listen on.
 The following forms may be used:

   ListenAddress host|IPv4_addr|IPv6_addr
   ListenAddress host|IPv4_addr:port
   ListenAddress [host|IPv6_addr]:port

 If port is not specified, sshd will listen on the address and all
 Port options specified.  The default is to listen on all local
 addresses.  Multiple ListenAddress options are permitted.

D
Dmitry Shitskov, 2018-09-06
@Zarom

/etc/ssh/sshd_config
set ListenAddress to
ListenAddress 10.44.243.252

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question