Interface en ligne de commande SSH
Le produit met à disposition un serveur SSH afin de permettre aux administrateurs de gérer le produit et ses fonctionnalités. Pour le configurer aller à la page > Accueil > Configuration > Sécurité > Droits d’administration
Activer le serveur SSH |
Activer/désactiver le serveur SSH True par défaut |
Clé publique SSH (pour login sans mot de passe) |
Clé publique pour l’authentification SSH |
Le serveur permet de gérer plusieurs sessions SSH, chacune avec des identifiants et des clés de session négociés lors de la phase d’échange de clés. Ceux-ci sont supprimés à la fin d’une session. Une session peut être fermée par un utilisateur en utilisant les touches Ctrl+D.
Le serveur utilise des suites de chiffrement fortes et sécurisées pour les communications.
Pour copier des fichiers dans le produit, vous pouvez utiliser scp dans le répertoire /tmp qui est le seul répertoire avec accès en écriture. Les fichiers copiés sur le SSH verront leurs capacités d’exécution supprimées pour des raisons de sécurité.
Liste des commandes SSH
Un sous-ensemble de commandes Linux est disponible, ainsi qu’un ensemble de commandes Etic Telecom qui vous aideront à configurer et à utiliser votre appareil.
Toutes ces commandes ont une aide à laquelle vous pouvez accéder avec l’argument --help.
| Commandes | Description |
|---|---|
m2me |
Démarrer ou arrêter M2Me |
test_smsemail |
Procéder au test d’envoi de sms et d’email |
stor |
Changer la sortie vers un état spécifique |
test_ftpc |
Tester le client FTP |
shdsl_testmode |
Tester le mode SHDSL |
shdsl_dotest |
Appeler SHDSL socrates |
shdsl_pmms |
Lire les pmms SHDSL |
get_external_ssh_users |
Obtenir la liste des utilisateurs qui se sont déjà connectés une fois à l’interface SSH à partir d’un serveur d’authentification délégué |
clear_external_ssh_users |
Effacer la liste des utilisateurs qui se sont déjà connectés une fois à l’interface SSH à partir d’un serveur d’authentification délégué |
sw_upgrade |
Mettre à jour le logiciel avec un code |
fw_upgrade |
Mettre à jour le firmware avec une archive |
get_upgrades_list |
Obtenir la liste des versions de mises à jour disponibles en ligne |
upgrade_from_eticnet |
Mettre à jour la version à partir du serveur Eticnet |
set_date_time |
Régler la date et l’heure |
unban_user |
Débannir un utilisateur banni de l’authentification par le mécanisme de protection |
simplify_hotline_remote_access |
Simplifiez l’accès à distance à la hotline pendant une période donnée. |
display_view |
Afficher les paramètres utilisés dans les vues |
delete_row |
Supprimer une ligne dans un groupe de paramètres de la configuration actuelle |
add_row |
Ajouter une ligne dans un groupe de paramètres |
swap_rows |
Échanger la position de deux lignes dans un groupe de paramètres |
get_groups_params |
Obtenir les paramètres d’un groupe de la configuration actuelle |
get_params |
Afficher la valeur des paramètres de la configuration actuelle |
get_status |
Afficher les statuts du produit |
get_groups_status |
Obtenir les valeurs d’un groupe de statuts |
set_params |
Modifier des paramètres de la configuration actuelle |
set_first_superadmin |
Définir le premier super administrateur |
reset_hotline_passwd |
Réinitialiser le mot de passe de la hotline |
config_list |
Lister les configurations enregistrées |
config_load |
Charger une configuration |
config_save |
Enregistrer une configuration 'Utilisateur' |
config_delete |
Supprimer une configuration 'Utilisateur' |
config_upload |
Uploader une configuration 'Utilisateur' |
config_load_fac |
Recharger la configuration d’usine |
config_export |
Exporter une configuration |
make_csr_request |
Effectuer une demande CSR pour une clé privée spécifique |
get_cert_infos |
Obtenir les détails d’un certificat |
generate_private_key |
Générer une clé privée |
import_private_key |
Importer une clé privée au format x509 |
delete_private_key |
Supprimer une clé privée |
add_crl |
Ajouter une liste de révocation de certificats au format x509 |
delete_crl |
Supprimer une liste de révocation de certificats |
add_cert |
Ajouter un certificat au format x509 |
add_pkcs12 |
Ajouter un fichier PKCS12 |
delete_cert |
Supprimer un certificat |
role_add |
Ajouter un ou plusieurs rôles d’administrateur personnalisés |
role_list |
Lister les rôles d’administrateur ou afficher leur description |
role_delete |
Supprimer un rôle d’administrateur personnalisé |
get_log |
Afficher un log |
Aide des commandes
m2me
$ m2me --help
m2me : Start or stop M2Me
usage : m2me <expected_state>
expected_state : START / STOP. start or stop the m2me on the device
test_smsemail
$ test_smsemail --help
test_smsemail : Proceed to the test of sending sms and email
usage : test_smsemail
stor
$ stor --help
stor : Change output to a specific state
usage : stor <expected_state>
expected_state : ON / OFF. Switch ON or switch OFF the stor
shdsl_dotest
$ shdsl_dotest --help
shdsl_dotest : Call SHDSL socrates
usage : shdsl_dotest <command>
command : Command to pass to socrates. help (without --) as command for more information
get_external_ssh_users
$ get_external_ssh_users --help
get_external_ssh_users : Get the list of users who have already logged in once to the SSH interface from a delegated authentication server
usage : get_external_ssh_users
clear_external_ssh_users
$ clear_external_ssh_users --help
clear_external_ssh_users : Clear the list of users who have already logged in once to the SSH interface from a delegated authentication server
usage : clear_external_ssh_users
sw_upgrade
$ sw_upgrade --help
sw_upgrade : Upgrade software with a code
usage : sw_upgrade <code>
code : Code provided by Etic Telecom to upgrade your device
fw_upgrade
$ fw_upgrade --help
fw_upgrade : Upgrade firmware with an archive
usage : fw_upgrade <fw_path> [end_upgrade] [config_file]
fw_path : Path of the firmware archive to upgrade to
end_upgrade : (Optionnal - Default : True) End the action and clean the pending status in database : True / False
config_file : (Optionnal - Default : '') Load a configuration file after the upgrade
get_upgrades_list
$ get_upgrades_list --help
get_upgrades_list : Get a list of available upgrades version online
usage : get_upgrades_list
upgrade_from_eticnet
$ upgrade_from_eticnet --help
upgrade_from_eticnet : Upgrade version from Eticnet server
usage : upgrade_from_eticnet <version> [config_file]
version_file : Version file to upgrade to. Use cmd 'get_upgrades_list' to get the possible version files available
config_file : (Optionnal - Default : '') Load a configuration file after the upgrade
set_date_time
$ set_date_time --help
set_date_time : Set the date and time
usage : set_date_time <date_time>
date_time : Date/Time to set. Format shall be YYYY-MM-DD_HH:mm
unban_user
$ unban_user --help
unban_user : Unban a banned user from authentication by the protection mechanism
usage : unban_user <ip>
user : User to unban.
simplify_hotline_remote_access
$ simplify_hotline_remote_access --help
simplify_hotline_remote_access : Simplify hotline remote access for an amount of time. This will disable hotline password requirement, and enable remote access VPN even if you have not defined an operator for it
usage : simplify_hotline_remote_access [nb_minutes]
nb_minutes : (Optionnal - Default: 60 - Range [1 - 480]) Number of minutes to simplify hotline remote access.
display_view
$ display_view --help
display_view : Display parameters descriptions used in views
usage : display_view [view] ...
views : 0-N view(s) to display
delete_row
$ delete_row --help
delete_row : Delete a row in current configuration
usage : delete_row <group_name> <row_index>
group_name : Name of the group where to deleted the row
row_index : Index of the row to delete
add_row
$ add_row --help
add_row : Add a row in a group of parameters
usage : add_row <group_name> <param_name param_value> [param_name param_value] ...
group_name : Name of the group where to add rows
param_name param_value : 1-N couples of <param_name param_value> to add in a group
swap_rows
$ swap_rows --help
swap_rows : Swap two rows in a group of parameters
usage : swap_rows <group_name> <row_index_1> <row_index_2>
group_name : Name of the group where to swap rows
row_index_(1|2) : Indexes of the rows to swap
get_groups_params
$ get_groups_params --help
get_groups_params : Get parameters of a group in the configuration
usage : get_groups_params <group> ...
group : 1-N group(s) to display
get_params
$ get_params --help
get_params : Get parameters in the configuration
usage : get_params <param> ...
param : 1-N param(s) to display
get_status
$ get_status --help
get_status : Get statuses of the product
usage : get_status <status>.<index> ...
status : 1-N status to display
index : Index of the specified status to get (0-N)
get_groups_status
$ get_groups_status --help
get_groups_status : Get statuses of a group of status
usage : get_groups_status <group> ...
group : 1-N group(s) to display
set_params
$ set_params --help
set_params : Set parameters in the configuration
usage : set_params <param_name param_value> [param_name param_value] ...
param_name param_value : 1-N couples of <param_name param_value> to add in the configuration
set_first_superadmin
$ set_first_superadmin --help
set_first_superadmin : Set first superadmin
usage : set_first_superadmin <login> <password>
login : Login of the Super Administrator.
password : Password of the Super Administrator. Password must follow the following rules:
* One lowercase letter
* One uppercase letter
* One number
* One special character in the subset: &#{}[]@!?_ *+=~$%
* Minimum of 8 characters
* Maximum of 50 characters
reset_hotline_passwd
$ reset_hotline_passwd --help
reset_hotline_passwd : Reset hotline password
usage : reset_hotline_passwd [password_length]
password_length : (Optionnal - Default : 12) Length of the generated password.
config_list
$ config_list --help
config_list : List saved configurations
usage : config_list [config_types]
config_types : types of configuration to display : Reference / User / Builder
config_load
$ config_load --help
config_load : Load a configuration
usage : config_load <conf_filename> [config_type] [edition_mode]
conf_filename : File name of the configuration to load
config_type : (Optionnal - Default : User) location of the configuration to load : Reference / User / Builder
edition_mode : (Optionnal - Default : False) start edition mode : True / False
edition mode : Configuration has to be validated with option <commit> to apply it
config_save
$ config_save --help
config_save : Save a 'User' configuration
usage : config_save <conf_name>
conf_name : Name of the saved configuration. Will be located in the User space
config_delete
$ config_delete --help
config_delete : Delete a 'User' configuration
usage : config_delete <conf_name>
conf_name : Name of the exported configuration. Will appear in the User space
config_upload
$ config_upload --help
config_upload : Upload a 'User' configuration
usage : config_upload <file_path> <conf_name> [force] [decryption_secret]
file_path : Path of the configuration file to upload
conf_name : Name of the configuration in User space
force : (Optionnal - Default : False) force upload file : True / False. Bypass illformed configuration
decryption_secret : (Optionnal) Secret to decrypt password in the configuration
config_load_fac
$ config_load_fac --help
config_load_fac : Reload factory configuration
usage : config_load_fac
config_export
$ config_export --help
onfig_export : Export the configuration
usage : config_export <conf_filename> <destination_file> <secret_encryption> [encryption_key] [config_type]
conf_name : Configuration name to export
destination_file : Output file destination
secret_encryption : Encrypt or not the secrets : encrypt / no_encryption
encryption_key : (Only if <secret_encryption> is `encrypt`) Key to encrypt configuration's secrets
config_type : (Optionnal - Default : User) location of the configuration : Reference / User / Builder
make_csr_request
$ make_csr_request --help
make_csr_request : Make a CSR request for a specific private key
usage : make_csr_request <private_key> [common_name] [country] [organization] [organizational_unit] [locality] [state]
private_key : The private key to make the CSR for
common_name : (Optionnal) Set Common Name (CN)
country : (Optionnal) Set Country (C)
organization : (Optionnal) Set Organization (O)
organizational_unit : (Optionnal) Set Organizational Unit (OU)
locality : (Optionnal) Set Locality (L)
state : (Optionnal) Set State (S)
# If you don't want a specific field. Leave it empty with ""
get_cert_infos
$ get_cert_infos --help
get_cert_infos : Get details of a certificate
usage : get_cert_infos <certificate> [CA]
certificate : Certificate to retrieve information
CA : (Optionnal - Default : False) Look in Certification Authorities certificates : True / False
generate_private_key
$ generate_private_key --help
generate_private_key : Generate a private key
usage : generate_private_key <pk_name> <algo> [algo_param]
pk_name : Name of the private key
algo : Private Key Algorithm (Possible value : rsa / ecdsa)
algo_param : (Optionnal) Depending of the algorithm choosen
rsa : (Default : 2048) length of the key (Possible value : [2048, 3072, 4096])
ecdsa : (Default : Prime256v1) curve to use (Possible value : [Prime256v1])
import_private_key
$ import_private_key --help
import_private_key : Import a private key in x509 format
usage : import_private_key <key_name> <key_path>
key_name : Name of the private key
key_path : Private key file path
delete_private_key
$ delete_private_key --help
delete_private_key : Delete a private key
usage : delete_private_key <private_key>
private_key : The private key to delete
add_crl
$ add_crl --help
add_crl : Add a certificate revocation list in x509 format
usage : add_crl <crl_name> <crl_path>
crl_name : Name of the certificate revocation list
crl_path : CRL file path
delete_crl
$ delete_crl --help
delete_crl : Delete a certificate revocation list
usage : delete_crl <crl_name>
crl_name : The CRL to delete
add_cert
$ add_cert --help
add_cert : Add a certificate in x509 format
usage : add_cert <cert_name> <cert_path> [CA]
cert_name : Name of the certificate
cert_path : Certificate file path
CA : (Optionnal - Default : False) Insert in Certification Authorities certificates : True / False
add_pkcs12
$ add_pkcs12 --help
add_pkcs12 : Add a PKCS12 file
usage : add_pkcs12 <pkcs12_name> <pkcs12_file> <pkcs12_password>
pkcs12_name : Name of the Pkcs12
pkcs12_file : PKCS12 file path
pkcs12_password : password of the pkcs12
delete_cert
$ delete_cert --help
delete_cert : Delete a certificate
usage : delete_cert <cert_name> [CA]
cert_name : The certificate to delete
CA : (Optionnal - Default : False) Delete in Certification Authorities certificates : True / False
role_add
$ role_add --help
role_add : Add administrator custom role(s)
usage : role_add <file_path>
file_path : Absolut path of the file with the customs roles to add
overwrite : (Optionnal - Default : False) Overwrite custom roles if it exists already
Les rôles personnalisés doivent être décrits au format json.
Ce format est une list de rôle. Chaque rôle est un dict contenant les paramètres suivants :
role_name |
Nom interne du rôle. 50 caractères maxmimum, doit être en minuscule et commence par |
local_fr |
Texte affiché en français |
local_en |
Texte affiché en anglais |
func_permissions |
Définir un niveau de permission pour chaque fonction :
Les fonctions |
[
{
"role_name": "p_custom_role_group_a",
"local_fr": "Administrateur A",
"local_en": "Administrator A",
"func_permissions": {
"func_generic": 30,
"func_biwan": 20,
"func_wan_eth": 20,
"func_wan_br": 20,
"func_wan_ip": 20,
"func_diagnostics": 20,
"func_logs": 20,
"func_net_stat": 20,
"func_diag_ifaces": 20,
"func_vpn_node": 20,
"func_tls_node": 20,
"func_tools": 20,
"func_firmconf": 20,
"func_product_def": 20
}
},
{
"role_name": "p_custom_role_group_b",
"local_fr": "Administrateur B",
"local_en": "Administrator B",
"func_permissions": {
"func_generic": 30,
"func_biwan": 30,
"func_wan_eth": 30,
"func_wan_gsm": 30,
"func_wan_br": 30,
"func_wan_ip": 30,
"func_diagnostics": 30,
"func_logs": 30,
"func_net_stat": 30,
"func_diag_ifaces": 30,
"func_vpn_node": 30,
"func_tls_node": 30,
"func_tools": 30,
"func_firmconf": 20,
"func_product_def": 20
}
}
]
role_list
$ role_list --help
role_list : List administrator roles or display their description
usage : role_list [role_name]
role_name : (Optionnal - Default : Empty) If empty, display role_name of all roles
If role_name is provided, display the role in a json format
role_delete
$ role_delete --help
role_delete : Delete an administrator custom role
usage : role_delete <role_name>
role_name : Custom role to delete
force : (Optionnal - Default : False) Delete the role even if administrators use it
get_log
$ get_log --help
get_log : Get a specific log
usage : get_log <type> [display] [specific_log]
type : Log type. Possible values : user / advanced_user / audit / firewall / vpn / m2me / charon / gsm_ext_counter_log / gsm_ext_log / gsm_counter_log / gsm_log
display : (Optionnal - Default : all) Display the whole log or output appended data as the file grows: all / follow
specific_log : (Optionnal - Only for type = vpn) A pair of param. Choose between server/client log and a configuration. Ex : server 1
$ get_log vpn follow server 0