diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2005-11-28 19:39:40 +0000 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2005-11-28 19:39:40 +0000 |
commit | e83ddafc05c8e9cbb3dfee3a2bda3663e3e501ca (patch) | |
tree | a79884b8a0f2ab048d11ad7bc033bcce69328e65 /scripts/openssh-host-keygen.sh | |
parent | 9c85a05486338b4223ae3bbec44796a13163ceba (diff) | |
download | ptxdist-e83ddafc05c8e9cbb3dfee3a2bda3663e3e501ca.tar.gz ptxdist-e83ddafc05c8e9cbb3dfee3a2bda3663e3e501ca.tar.xz |
still used
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-0.7-trunk@3444 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'scripts/openssh-host-keygen.sh')
-rwxr-xr-x | scripts/openssh-host-keygen.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/openssh-host-keygen.sh b/scripts/openssh-host-keygen.sh new file mode 100755 index 000000000..c666330db --- /dev/null +++ b/scripts/openssh-host-keygen.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +mount -o remount,rw / +if [ -f /etc/ssh/ssh_host_key ]; then + echo "/etc/ssh/ssh_host_key already exists, skipping." +else + /usr/bin/ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N "" +fi + + +if [ -f /etc/ssh/ssh_host_dsa_key ]; then + echo "/etc/ssh/ssh_host_dsa_key already exists, skipping." +else + /usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N "" +fi + + +if [ -f /etc/ssh/ssh_host_rsa_key ]; then + echo "/etc/ssh/ssh_host_rsa_key already exists, skipping." +else + /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" +fi +mount -o remount,ro / + +mkdir -p /var/run/sshd +chown root.root /var/run/sshd +chmod 700 /var/run/sshd + |