Endpoint: /server/security/ssh

Returns and update server SSH security settings.

Method & URL

GET https://[server URL]:[port]/admin/v2/server/security/ssh

GET Body Sample

Copy
GET https://{{host}}/admin/v2/server/security/ssh HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}

GET Response Body Sample

Copy
{
"data": {  
"type": "sshServerSecurity",  
"id": "1",  
"attributes": {    
"sshSettings": {    
"allowedCiphersList": "aes256-gcm@openssh.com,aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,
aes192-ctr,aes192-cbc,aes128-gcm@openssh.com,aes128-ctr,aes128-cbc",     
"allowedKexesCiphersList": "ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,
diffie-hellman-group16-sha512,diffie-hellman-group14-sha256,diffie-hellman-group-exchange-sha256",     
"allowedMacsList": "hmac-sha2-512-etm@openssh.com,hmac-sha2-512,hmac-sha2-256-etm@openssh.com,
hmac-sha2-256,hmac-sha1-etm@openssh.com,hmac-sha1",     
"softwareVersion": "8.1.0.0_openssh",     
"comments": "Globalscape"    },     
"sshFipsEnabled": false   

},
"links": {   
"self": "admin/v2/server/security/ssh"
}

GET PowerShell Sample

Copy
#get Server SSH Security Settings
Write-Output "Get Server SSH Settings"
Write-Output "-----"
$serverSSH = Invoke-RestMethod -Uri "$baseURL/v2/server/security/ssh" -Method 
'GET' -Headers $authHeaderWrite-Output $serverSSH | ConvertTo-Json
foreach ($server in $serverSSH.data)
{   
Write-Output ("Server $($serverSSH.data)")
}  

Method & URL

PATCH https://[server URL]:[port]/admin/v2/server/security/ssh

PATCH Body Sample

Copy
PATCH https://{{host}}/admin/v2/server/security/ssh HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
 
{
  "data": {
    "type": "sshServerSecurity",
    "id": "1",
    "attributes": {
      "sshFipsEnabled": true
    }
  },
  "links": {
    "self": "admin/v2/server/security/ssh"
  }
}

PATCH Response Body Sample

The response will return the same response as the GET request, however, it will now include the updated PATCH request(s).

PATCH PowerShell Sample

Copy
###(PATCH) SSH Security Settings (enable FIPS)
Write-Output "Server SSH Enable FIPS Patch"
Write-Output "-----"
$update = 
'{ 
"data": {    
"type": "sshServerSecurity",    
"id": "1",    
"attributes": {      
"sshFipsEnabled": true    
}  
},  
"links": {    
"self": "admin/v2/server/security/ssh"  
}
}'$update = $update | ConvertFrom-Json
$update = $update | ConvertTo-Json 
-Depth 10
$patchReturn = Invoke-RestMethod 
-Uri "$baseURL/v2/server/security/ssh" 
-Method 'PATCH' 
-Headers $authHeader 
-Body $update