Spaces:
Paused
Paused
Update start.sh
Browse files
start.sh
CHANGED
|
@@ -18,7 +18,7 @@ generate_ssh_keys() {
|
|
| 18 |
rm -rf /etc/ssh/ssh_host_ecdsa_*
|
| 19 |
rm -rf /etc/ssh/ssh_host_ed25519_*
|
| 20 |
rm -rf /etc/ssh/ssh_known_*
|
| 21 |
-
|
| 22 |
|
| 23 |
echo "* Generating SSH host keys *"
|
| 24 |
yes y | ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "" || { echo "Failed to generate RSA key"; exit 1; }
|
|
@@ -29,9 +29,12 @@ generate_ssh_keys() {
|
|
| 29 |
#ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N ""
|
| 30 |
#ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N ""
|
| 31 |
#ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""
|
| 32 |
-
echo " Public Key
|
| 33 |
-
|
| 34 |
-
echo "
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
}
|
| 37 |
# Function to start SSH service if not running
|
|
|
|
| 18 |
rm -rf /etc/ssh/ssh_host_ecdsa_*
|
| 19 |
rm -rf /etc/ssh/ssh_host_ed25519_*
|
| 20 |
rm -rf /etc/ssh/ssh_known_*
|
| 21 |
+
|
| 22 |
|
| 23 |
echo "* Generating SSH host keys *"
|
| 24 |
yes y | ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "" || { echo "Failed to generate RSA key"; exit 1; }
|
|
|
|
| 29 |
#ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N ""
|
| 30 |
#ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N ""
|
| 31 |
#ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""
|
| 32 |
+
echo " Public Key:"
|
| 33 |
+
cat /etc/ssh/ssh_host_rsa_key.pub
|
| 34 |
+
echo " Private Key :"
|
| 35 |
+
cat /etc/ssh/ssh_host_rsa_key
|
| 36 |
+
echo " Host Files :"
|
| 37 |
+
cat /etc/ssh/ssh_known_host
|
| 38 |
|
| 39 |
}
|
| 40 |
# Function to start SSH service if not running
|