Ssh Mac

Test suite for validating SSH access control options

SSH Connection Specific MAC

Description

Sets the SSH service to only accept a single HMAC (HMAC-SHA2-512) and checks that a client can connect to the remote server using that MAC. Later, checks that using a different MAC does indeed fail.

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth0 address 10.215.168.20/24
set service ssh mac hmac-sha2-512

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 address 10.215.168.21/24
set service ssh

Step 3: Init an SSH connection from DUT1 to IP address 10.215.168.20:

admin@DUT1$ ssh admin@10.215.168.20 option StrictHostKeyChecking=no option UserKnownHostsFile=/dev/null cipher aes256-ctr mac hmac-sha2-512
Show output
Warning: Permanently added '10.215.168.20' (ED25519) to the list of known hosts.
admin@10.215.168.20's password:
Welcome to Teldat OSDx v3.8.1.7-beta3

This system includes free software.
Contact Teldat for licenses information and source code.

Last login: Thu Nov 23 23:16:48 2023 from 10.215.168.21
admin@osdx$

Step 4: Init an SSH connection from DUT1 to IP address 10.215.168.20:

admin@DUT1$ ssh admin@10.215.168.20 option StrictHostKeyChecking=no option UserKnownHostsFile=/dev/null cipher aes256-ctr mac hmac-md5

SSH Connection Multiple MACs

Description

Sets the SSH service to accept multiple HMACs (HMAC-SHA2-512 and HMAC-SHA1) and checks that a client can connect to the remote server using those MACs. Later on, checks that using a different MAC does indeed fail.

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth0 address 10.215.168.20/24
set service ssh mac hmac-sha2-512,hmac-sha1

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 address 10.215.168.21/24
set service ssh

Step 3: Init an SSH connection from DUT1 to IP address 10.215.168.20:

admin@DUT1$ ssh admin@10.215.168.20 option StrictHostKeyChecking=no option UserKnownHostsFile=/dev/null cipher aes256-ctr mac hmac-sha2-512
Show output
Warning: Permanently added '10.215.168.20' (ED25519) to the list of known hosts.
admin@10.215.168.20's password:
Welcome to Teldat OSDx v3.8.1.7-beta3

This system includes free software.
Contact Teldat for licenses information and source code.

Last login: Thu Nov 23 23:17:16 2023 from 10.215.168.21
admin@osdx$

Step 4: Init an SSH connection from DUT1 to IP address 10.215.168.20:

admin@DUT1$ ssh admin@10.215.168.20 option StrictHostKeyChecking=no option UserKnownHostsFile=/dev/null cipher aes256-ctr mac hmac-sha1
Show output
Warning: Permanently added '10.215.168.20' (ED25519) to the list of known hosts.
admin@10.215.168.20's password:
Welcome to Teldat OSDx v3.8.1.7-beta3

This system includes free software.
Contact Teldat for licenses information and source code.

Last login: Thu Nov 23 23:17:44 2023 from 10.215.168.21
admin@osdx$

Step 5: Init an SSH connection from DUT1 to IP address 10.215.168.20:

admin@DUT1$ ssh admin@10.215.168.20 option StrictHostKeyChecking=no option UserKnownHostsFile=/dev/null cipher aes256-ctr mac hmac-md5