mirror of
https://github.com/m8tin/cis.git
synced 2026-08-01 11:47:31 +02:00
Module ssh now uses new REGEX[SSH_ADDRESS]
This commit is contained in:
@@ -11,7 +11,7 @@ source /cis/core/base.module.sh
|
||||
# There are limitations of characters which are allowed to build the command. So try to express the task in a simple way.
|
||||
function ssh.onHostRun() {
|
||||
local _REMOTE_HOST _COMMAND
|
||||
base.set _REMOTE_HOST "${1:?"FQDN of server missing: e.g. host.example.net[:port]"}" '^([a-zA-Z0-9][a-zA-Z0-9@.-]*)+(:[0-9]+)?$'
|
||||
base.set _REMOTE_HOST "${1:?"FQDN of server missing: e.g. host.example.net[:port]"}" "${REGEX[SSH_ADDRESS]}"
|
||||
base.set _COMMAND "${2:?"COMMAND missing"}" "${REGEX[COMMAND]}"
|
||||
|
||||
local _REMOTE_USER _REMOTE_HOSTNAME_FQDN _REMOTE_PORT _SOCKET
|
||||
|
||||
Reference in New Issue
Block a user