privateone commited on
Commit
d64ca78
·
verified ·
1 Parent(s): f0e44d4

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +7 -4
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
- touch /etc/ssh/known_hosts
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 $(cat /etc/ssh/ssh_host_rsa_key.pub)"
33
- echo " Private Key $(cat /etc/ssh/ssh_host_rsa_key)"
34
- echo " Host Files $(cat /etc/ssh/ssh_known_host)"
 
 
 
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