mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
ssh: allow to configure public key auth algorithms
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -77,14 +77,15 @@ func (h *HostKey) GetAlgosAsString() string {
|
||||
|
||||
// ServiceStatus defines the service status
|
||||
type ServiceStatus struct {
|
||||
IsActive bool `json:"is_active"`
|
||||
Bindings []Binding `json:"bindings"`
|
||||
SSHCommands []string `json:"ssh_commands"`
|
||||
HostKeys []HostKey `json:"host_keys"`
|
||||
Authentications []string `json:"authentications"`
|
||||
MACs []string `json:"macs"`
|
||||
KexAlgorithms []string `json:"kex_algorithms"`
|
||||
Ciphers []string `json:"ciphers"`
|
||||
IsActive bool `json:"is_active"`
|
||||
Bindings []Binding `json:"bindings"`
|
||||
SSHCommands []string `json:"ssh_commands"`
|
||||
HostKeys []HostKey `json:"host_keys"`
|
||||
Authentications []string `json:"authentications"`
|
||||
MACs []string `json:"macs"`
|
||||
KexAlgorithms []string `json:"kex_algorithms"`
|
||||
Ciphers []string `json:"ciphers"`
|
||||
PublicKeyAlgorithms []string `json:"public_key_algorithms"`
|
||||
}
|
||||
|
||||
// GetSSHCommandsAsString returns enabled SSH commands as comma separated string
|
||||
@@ -112,6 +113,12 @@ func (s *ServiceStatus) GetCiphersAsString() string {
|
||||
return strings.Join(s.Ciphers, ", ")
|
||||
}
|
||||
|
||||
// GetPublicKeysAlgosAsString returns enabled public key authentication
|
||||
// algorithms as comma separated string
|
||||
func (s *ServiceStatus) GetPublicKeysAlgosAsString() string {
|
||||
return strings.Join(s.PublicKeyAlgorithms, ", ")
|
||||
}
|
||||
|
||||
// GetStatus returns the server status
|
||||
func GetStatus() ServiceStatus {
|
||||
return serviceStatus
|
||||
|
||||
Reference in New Issue
Block a user