mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 12:56:59 +08:00
fix(riot): secure control master
This commit is contained in:
parent
36fd85121b
commit
500c3bdfe5
|
@ -85,7 +85,11 @@ parse_remote() {
|
||||||
USERNAME="" # optional
|
USERNAME="" # optional
|
||||||
SSH_OPTIONS="" # optional
|
SSH_OPTIONS="" # optional
|
||||||
if [[ "$RIOT_TRUST_CLIENT" == "1" ]]; then
|
if [[ "$RIOT_TRUST_CLIENT" == "1" ]]; then
|
||||||
SSH_OPTIONS='-o ControlMaster=auto -o ControlPath=/tmp/sshcm-%C -o PermitLocalCommand=yes'
|
SSH_OPTIONS='-o PermitLocalCommand=yes'
|
||||||
|
if [[ "$(get_os_type)" != "msys" ]]; then
|
||||||
|
mkdir -p ~/.ssh/master-socket
|
||||||
|
SSH_OPTIONS="$SSH_OPTIONS -o ControlMaster=auto -o ControlPath=~/.ssh/master-socket/%C"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
# handle input
|
# handle input
|
||||||
local remote="$1"
|
local remote="$1"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user