Note
DEMO FEATURE - Two-Factor
Authentication–X.509v3 Certificates for SSH is
a demonstration feature on some products. Demonstration features are provided for
testing purposes. Demonstration features are for lab use only and are not for use in
a production environment. For more information on feature support, see VOSS Feature Support Matrix.
Use the following procedure as an example to configure the SSH server on the VOSS switch, and the SSH client Secure CRT for two factor authentication using
X.509 V3 certificates.
Before you begin
The following certificates must be loaded on the SSH server and SSH client:
About this task
Use the following steps as an example to configure the SSH server on the VOSS switch, the RADIUS Windows server, and the SSH client Secure CRT.
Procedure
-
Enter Global Configuration mode:
enable
configure
terminal
-
Ensure the switch is running in
Enhanced Secure Mode:
Switch:1(config)#show boot config flags
flags enhancedsecure-mode true
Note
This shows a partial output of only the relevant entry.
-
Ensure the switch clock is synchronized:
Switch:1#show clock
System Clock time : Fri Oct 12 19:36:36 2018 UTC
- Generate the key pair:
Switch:1(config)#certificate generate-keypair type rsa size 2048
Switch(config)#show certificate key-name
Key Name: rsa_2048
Public Key Value: …
-
Configure the certificate
subject parameters:
Switch:1(config)#certificate subject common-name CAC-server
Switch:1(config)#certificate subject e-mail user@companyname.com
Switch:1(config)#certificate subject unit CAC-project
Switch:1(config)#certificate subject organization Extreme
Switch:1(config)#certificate subject locality Salem
Switch:1(config)#certificate subject province New Hampshire
Switch:1(config)#certificate subject country US
Switch:1(config)#show certificate subject
Common-name : CAC-server
E-mail : jsmith@extremenetworks.com
Organizational unit : CAC-project
Organization : Extreme
Locality : Salem
State/Province : New Hampshire
Country : US
Note
The values mentioned are for example.
-
Generate the Certificate Signing Request (CSR):
Switch:1(config)#certificate generate-csr
-
Export the csr file from
/intflash/.cert/.
-
Create a subject certificate using the exported csr file.
-
Import the root certificate .der file to
/intflash/.cert/.offlineRootCACert.
-
Import the intermediate certificate .der file to
/intflash/.cert/.offlineCACert.
-
Import the subject certificate .der file to
/intflash/.cert/.offlineCert.
-
Install the Root
certificate:
Switch:1(config)#certificate install-file offline-root-ca-filename <SUBJECT_ROOT_CERTIFICATE_NAME>
Switch:1(config)#show certificate cert-type root-ca-cert
CERT STORE table entry
Certificate Type : Root CA Certificate
CommonName : ca_cert
VersionNumber : X.509 v3
SerialNumber : 00fb084e6b97f3f72a
IssuerName : CN:ca_cert, EM:none@none.com, OU:SSH, O:LUX, L:BUC, P:RO, C:RO
ValidityPeriodNotBefore : 06/15/2018 05:46:58
ValidityPeriodNotAfter : 06/10/2038 05:46:58
CertificateSignatureAlgorithm : sha256withRSAEncryption
CertificateSignature : …
Subject : CN:ca_cert, EM:none@none.com, OU:SSH, O:LUX, L:BUC, P:RO, C:RO
SubjectPublicKeyAlgorithm : rsaEncryption
SubjectPublicKey : …
HasBasicConstraint : 1
HasKeyUsage : 1
IsCa : 1
KeyUsage : 97 digitalSignature keyCertSign cRLSign
ExtendedKeyUsage :
CDPUrl :
OCSPUrl :
CertificateFileName : /intflash/.cert/.rootCACertStore/root_ca_cert_ca_cert.der
-
Install the Intermediate certificate:
Switch:1(config)#certificate install-file offline-ca-filename <INTERMEDIATE_CERTIFICATE_NAME>
Switch:1(config)#show certificate cert-type intermediate-ca-cert
CERT STORE table entry
Certificate Type : Intermediate CA Certificate
CommonName : intermediate_csr
VersionNumber : X.509 v3
SerialNumber : 1000
IssuerName : CN:ca_cert, EM:none@none.com, OU:SSH, O:LUX, L:BUC, P:RO, C:RO
ValidityPeriodNotBefore : 06/15/2018 05:56:10
ValidityPeriodNotAfter : 06/12/2028 05:56:10
CertificateSignatureAlgorithm : sha256withRSAEncryption
CertificateSignature : …
Subject : CN:intermediate_csr, EM:none@none.com, OU:SSH, O:LUX, L:, P:RO, C:RO
SubjectPublicKeyAlgorithm : rsaEncryption
SubjectPublicKey : …
HasBasicConstraint : 1
HasKeyUsage : 1
IsCa : 1
KeyUsage : 97 digitalSignature keyCertSign cRLSign
ExtendedKeyUsage :
CDPUrl :
OCSPUrl :
CertificateFileName : /intflash/.cert/.caCertStore/ca_cert_intermediate_csr.der
-
Install the Subject certificate:
Switch:1(config)# certificate install-file offline-subject-filename <SUBJECT_CERTIFICATE_NAME>
Switch:1(config)#show certificate cert-type offline-subject-cert
CERT table entry
Certificate Type : Offline Subject Certificate
VersionNumber : X.509 v3
SerialNumber : 1006
IssuerName : CN:intermediate_csr, EM:none@none.com, OU:SSH, O:LUX, L:, P:RO, C:RO
ValidityPeriodNotBefore : 07/26/2018 10:17:24
ValidityPeriodNotAfter : 08/05/2019 10:17:24
CertificateSignatureAlgorithm : sha256withRSAEncryption
CertificateSignature : …
Subject : CN:issue1, EM:issue1@none.com, OU:SSH1, O:LUX1, L:BUC1, P:BUC1, C:RO1
SubjectPublicKeyAlgorithm : rsaEncryption
SubjectPublicKey : …
HasBasicConstraint : 1
HasKeyUsage : 1
IsCa : 0
KeyUsage : 7 digitalSignature nonRepudiation keyEncipherment
ExtendedKeyUsage : TLS Web Client Authentication, Email Protection,
CDPUrl :
OCSPUrl : http://10.2.38.240:3141
Status : offline-certificate
Installed : 1
-
Import the Root CA certificate .der file that signed the client certificate
chain to /intflash/.cert/.offlineRootCACert.
-
Install the Root CA certificate that signed the client certificate chain:
Switch:1(config)#certificate install-file offline-root-ca-filename <CLIENT_ROOT_CERTIFICATE_NAME>
Switch:1(config)#show certificate cert-type root-ca-cert
CERT STORE table entry
Certificate Type : Root CA Certificate
CommonName : ca_cert
VersionNumber : X.509 v3
SerialNumber : 00fb084e6b97f3f72a
IssuerName : CN:ca_cert, EM:none@none.com, OU:SSH, O:LUX, L:BUC, P:RO, C:RO
ValidityPeriodNotBefore : 06/15/2018 05:46:58
ValidityPeriodNotAfter : 06/10/2038 05:46:58
CertificateSignatureAlgorithm : sha256withRSAEncryption
CertificateSignature : …
Subject : CN:ca_cert, EM:none@none.com, OU:SSH, O:LUX, L:BUC, P:RO, C:RO
SubjectPublicKeyAlgorithm : rsaEncryption
SubjectPublicKey : …
HasBasicConstraint : 1
HasKeyUsage : 1
IsCa : 1
KeyUsage : 97 digitalSignature keyCertSign cRLSign
ExtendedKeyUsage :
CDPUrl :
OCSPUrl :
CertificateFileName : /intflash/.cert/.rootCACertStore/root_ca_cert_ca_cert.der
Switch:1(config)#no ssh rsa-auth
Switch:1(config)#no ssh dsa-auth
Switch:1(config)#no ssh pass-auth
Switch:1(config)#ssh x509v3-auth enable
Switch:1(config)#show ssh global
Total Active Sessions : 0
version : v2only
port : 22
max-sessions : 4
timeout : 60
action rsa-host key : rsa-hostkeysize 2048
action dsa-host key : dsa-hostkeysize 1024
rsa-auth : false
dsa-auth : false
pass-auth : false
keyboard-interactive-auth : false
x509-auth : true
x509-auth overwrite : false
x509-auth strip-domain : false
x509-auth use-domain : -
x509-auth revocation-check-method : OCSP
sftp enable : true
client enable : true
enable : true
authentication-type : aead-aes-128-gcm-ssh aead-aes-256-gcm-ssh hmac-sha1 hmac-sha2-256
encryption-type : 3des-cbc aead-aes-128-gcm-ssh aead-aes-256-gcm-ssh aes128-cbc aes128-ctr
aes192-cbc aes192-ctr aes256-cbc aes256-ctr blowfish-cbc rijndael128-cbc rijndael192-cbc
key-exchange-method : diffie-hellman-group1-sha1 diffie-hellman-group14-sha1
Note
Disable all other SSH authentication methods except X.509 V3 on the VOSS switch because the SSH client Secure CRT
always prefers SSH RSA over X.509 V3 authentication. You can also force
Secure CRT to negotiate X.509 V3 SSH RSA only.
-
From the RADIUS server, configure a username that is the same as the
principal-name from the PIV card certificate with an empty password, or with a
specific password. Enable the network policy.
-
From the RADIUS server, configure one standard attribute and one
Vendor-specific attribute with a username and password policy.
-
From the SSH client Secure CRT,
import the External Root CA certificate ca.cert.pem.
-
Connect a card reader to your computer and insert the smart card.
-
From the SSH client Secure CRT,
open an SSH session with the username from the subject certificate as configured
on the RADIUS server. Select the proper certificate from the smart card.
-
Enter the PIN for the smart card.
The username is sent to the RADIUS server for authorization after you enter
the PIN.
-
Enter the password for the cardholder user.