switch script to root user
This commit is contained in:
parent
8856797051
commit
2018972aee
2 changed files with 4 additions and 5 deletions
|
|
@ -69,7 +69,7 @@ let
|
||||||
|
|
||||||
# MAIN SCRIPT
|
# MAIN SCRIPT
|
||||||
echo "[ Creating ssh connection socket ]"
|
echo "[ Creating ssh connection socket ]"
|
||||||
$SSHCMD -MfNx dev@$Host
|
$SSHCMD -MfNx root@$Host
|
||||||
|
|
||||||
echo "[ Opening ssh reverse proxy ]"
|
echo "[ Opening ssh reverse proxy ]"
|
||||||
PORT=$($SSHCMD -O forward -R 0:localhost:2222 null)
|
PORT=$($SSHCMD -O forward -R 0:localhost:2222 null)
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,8 @@ let
|
||||||
KbdInteractiveAuthentication no
|
KbdInteractiveAuthentication no
|
||||||
PubkeyAuthentication no
|
PubkeyAuthentication no
|
||||||
|
|
||||||
# Only allow dev account
|
PermitRootLogin yes
|
||||||
PermitRootLogin no
|
AllowUsers root
|
||||||
AllowUsers dev
|
|
||||||
|
|
||||||
AllowTcpForwarding yes
|
AllowTcpForwarding yes
|
||||||
X11Forwarding no
|
X11Forwarding no
|
||||||
|
|
@ -59,7 +58,7 @@ pkgs.dockerTools.buildLayeredImage {
|
||||||
ln -sfn /proc/self/mounts ./etc/mtab
|
ln -sfn /proc/self/mounts ./etc/mtab
|
||||||
|
|
||||||
cat <<EOF > ./etc/passwd
|
cat <<EOF > ./etc/passwd
|
||||||
root:x:0:0:root:/root:/bin/sh
|
root:x:0:0:root:/root:/bin/bash
|
||||||
dev:x:1000:1000:dev:/home/dev:/bin/bash
|
dev:x:1000:1000:dev:/home/dev:/bin/bash
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue