wsl service cron status | Select-String Active | foreach-object { $_ -replace '.*since (.*)', 'running since $1'}
(wsl service cron status | Select-String Active) -replace '.*since (.*)', 'running since $1'
$status = wsl service cron status | Select-String Active
$status -replace '.*since (.*)', 'running since $1'
-replace '.*since (.*)', 'running since $1'
function InstallNASDrive { net use N: $NASDrive /persistent:Yes }
function InstallNASDrive {
net use N: $NASDrive /persistent:Yes
# что-то
}
Options for restricting SSH features
Files and their options that alter behavior are:
~/.ssh/authorized_keys - contains keys which are allowed to connect which can be given options:
command="command" - The command supplied by the user (if any) is ignored. Note that the client may specify TCP and/or X11 forwarding unless they are explicitly prohibited. Note that this option applies to shell, command or subsystem execution.
no-agent-forwarding - Forbids authentication agent forwarding when this key is used for authentication.
no-port-forwarding - Forbids TCP forwarding when this key is used for authentication
no-X11-forwarding - "Forbids X11 forwarding when this key is used for authentication."
permitopen="host:port" - Limit local 'ssh -L' port forwarding such that it may only connect to the specified host and port.
Я знаю о существовании ssh-agent, но не хочу им пользоваться, хочу держать свою пассфразу от ключа в открытом виде в скрипте, можно ли как-то подавать её на вход в ssh ?
никак. и не надо пароль держать в открытом виде
Name : microsoft.powershell
PSVersion : 5.1
StartupScript :
RunAsUser :
Permission : BUILTIN\Administrators AccessAllowed
Name : microsoft.powershell.workflow
PSVersion : 5.1
StartupScript :
RunAsUser :
Permission : BUILTIN\Administrators AccessAllowed
Name : microsoft.powershell32
PSVersion : 5.1
StartupScript :
RunAsUser :
Permission : BUILTIN\Administrators AccessAllowed