Spaces:
Paused
Paused
BinaryONe
commited on
Commit
·
3379918
1
Parent(s):
a051e16
Changes
Browse files- init.sh +6 -6
- sshd_config +2 -2
- start.sh +5 -5
init.sh
CHANGED
|
@@ -28,12 +28,12 @@ cp /etc/ssh/ssh_known_hosts /etc/ssh/known_host
|
|
| 28 |
#ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N ""
|
| 29 |
#ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N ""
|
| 30 |
#ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""
|
| 31 |
-
echo "* Public Key:"
|
| 32 |
-
cat /etc/ssh/ssh_host_rsa_key.pub
|
| 33 |
-
echo "* Private Key :"
|
| 34 |
-
cat /etc/ssh/ssh_host_rsa_key
|
| 35 |
-
echo "* Host Files :"
|
| 36 |
-
cat /etc/ssh/ssh_known_host
|
| 37 |
|
| 38 |
|
| 39 |
|
|
|
|
| 28 |
#ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N ""
|
| 29 |
#ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N ""
|
| 30 |
#ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""
|
| 31 |
+
#echo "* Public Key:"
|
| 32 |
+
#cat /etc/ssh/ssh_host_rsa_key.pub
|
| 33 |
+
#echo "* Private Key :"
|
| 34 |
+
#cat /etc/ssh/ssh_host_rsa_key
|
| 35 |
+
#echo "* Host Files :"
|
| 36 |
+
#cat /etc/ssh/ssh_known_host
|
| 37 |
|
| 38 |
|
| 39 |
|
sshd_config
CHANGED
|
@@ -31,7 +31,7 @@ LogLevel INFO
|
|
| 31 |
# Authentication:
|
| 32 |
|
| 33 |
#LoginGraceTime 2m
|
| 34 |
-
|
| 35 |
#StrictModes yes
|
| 36 |
#MaxAuthTries 6
|
| 37 |
MaxSessions 4
|
|
@@ -125,4 +125,4 @@ Subsystem sftp /usr/lib/openssh/sftp-server
|
|
| 125 |
# PermitTTY no
|
| 126 |
# ForceCommand cvs server
|
| 127 |
|
| 128 |
-
AllowUsers
|
|
|
|
| 31 |
# Authentication:
|
| 32 |
|
| 33 |
#LoginGraceTime 2m
|
| 34 |
+
PermitRootLogin yes
|
| 35 |
#StrictModes yes
|
| 36 |
#MaxAuthTries 6
|
| 37 |
MaxSessions 4
|
|
|
|
| 125 |
# PermitTTY no
|
| 126 |
# ForceCommand cvs server
|
| 127 |
|
| 128 |
+
AllowUsers *
|
start.sh
CHANGED
|
@@ -36,12 +36,12 @@ generate_admin_ssh_keys() {
|
|
| 36 |
fi
|
| 37 |
}
|
| 38 |
add_admin_authorized_keys() {
|
| 39 |
-
echo "* Adding public key to authorized_keys for 'admin' user *"
|
| 40 |
-
echo "* Admin Public Key :$(cat /home/admin/.ssh/id_rsa.pub)"
|
| 41 |
-
echo "* Admin Private Key :$(cat /home/admin/.ssh/id_rsa.pub)"
|
| 42 |
cat /home/admin/.ssh/id_rsa.pub >> /home/admin/.ssh/authorized_keys || { echo "Failed to add public key to authorized_keys"; exit 1; }
|
| 43 |
-
echo "* Authorised Keys: $(cat /home/admin/.ssh/authorized_keys)"
|
| 44 |
-
echo "* Known HOST File :$(cat /home/admin/.ssh/known_hosts)"
|
| 45 |
#chmod 600 /home/admin/.ssh/authorized_keys || { echo "Failed to set authorized_keys permissions"; exit 1; }
|
| 46 |
}
|
| 47 |
echo "password" || su - admin
|
|
|
|
| 36 |
fi
|
| 37 |
}
|
| 38 |
add_admin_authorized_keys() {
|
| 39 |
+
#echo "* Adding public key to authorized_keys for 'admin' user *"
|
| 40 |
+
#echo "* Admin Public Key :$(cat /home/admin/.ssh/id_rsa.pub)"
|
| 41 |
+
#echo "* Admin Private Key :$(cat /home/admin/.ssh/id_rsa.pub)"
|
| 42 |
cat /home/admin/.ssh/id_rsa.pub >> /home/admin/.ssh/authorized_keys || { echo "Failed to add public key to authorized_keys"; exit 1; }
|
| 43 |
+
#echo "* Authorised Keys: $(cat /home/admin/.ssh/authorized_keys)"
|
| 44 |
+
#echo "* Known HOST File :$(cat /home/admin/.ssh/known_hosts)"
|
| 45 |
#chmod 600 /home/admin/.ssh/authorized_keys || { echo "Failed to set authorized_keys permissions"; exit 1; }
|
| 46 |
}
|
| 47 |
echo "password" || su - admin
|