Creating SSH credentials with ssh-keygenIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Creating SSH credentials with ssh-keygen command Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } N/A Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } 1. Generate a Private/Public Key Pair ssh-keygen -t rsa -b 4096 -m PEM -f servicenow_rsa -N "your-passphrase-here" By default, `ssh-keygen` with `-m PEM` will encrypt the private key using AES-128-CBC if you provide a passphrase. If you want to explicitly specify the cipher, you can use the `-O` option (OpenSSH 7.8+). ssh-keygen -t rsa -b 4096 -m PEM -f servicenow_rsa -N "your-passphrase-here" -O cipher=aes128-cbc-t: Type of key algorithm (RSA, DSA, ECDSA, ED25519)-b: Bits - key size/strength (RSA: 2048 default, 4096 recommended for security)-f: Filename - output file name-N: New passphrase - encrypts the private key (empty string "" = no passphrase) 2. Example Key Formats Private Key (servicenow_rsa) -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: AES-128-CBC,1EA256D0150AFC1846A8B3F27A392094 ... -----END RSA PRIVATE KEY----- Public Key (servicenow_rsa.pub) ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCTM... 3. Deploy Public Key on Target Server mkdir -p ~/.ssh && chmod 700 ~/.ssh cat servicenow_rsa.pub >> ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys 4. Configure ServiceNow Credential 1. Navigate to **Credentials** in ServiceNow. 2. Click **New** → Select **SSH Private Key**. 3. Fill in the following fields: - **Name** → Descriptive name for the key. - **Username** → Target system username (the same account where the public key was added). - **Password** → Leave blank unless required. - **Passphrase** → Enter the passphrase you used when generating the key. - **Private Key** → Paste the full contents of `servicenow_rsa`. 4. Save the credential. Manual Testing from MID Server Before relying on ServiceNow's Test Credential, manually test from the MID Server host to confirm SSH works. ssh -i "<Path to private key>" user@Target-Host-or-IP Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } https://www.servicenow.com/docs/bundle/zurich-platform-security/page/product/credentials/reference/r_SSHCredentialsForm.html