-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for configurable SSH server
- Loading branch information
1 parent
1074b86
commit 6ee5432
Showing
11 changed files
with
291 additions
and
18 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
# Store and convert RSA PUBLIC/PRIVATE KEYs to be able to use them in | ||
# OpenSSHd. | ||
set -e | ||
|
||
NAME="$1" | ||
DIR="$2" | ||
PUBLIC="$3" | ||
PRIVATE="$4" | ||
TMP="$(mktemp)" | ||
|
||
echo -e '-----BEGIN RSA PRIVATE KEY-----' > "$DIR/$NAME" | ||
echo "$PRIVATE" >> "$DIR/$NAME" | ||
echo -e '-----END RSA PRIVATE KEY-----' >> "$DIR/$NAME" | ||
|
||
echo -e "-----BEGIN RSA PUBLIC KEY-----" > "$TMP" | ||
echo -e "$PUBLIC" >> "$TMP" | ||
echo -e "-----END RSA PUBLIC KEY-----" >> "$TMP" | ||
|
||
ssh-keygen -i -m PKCS8 -f "$TMP" > "$DIR/$NAME.pub" | ||
chmod 0600 "$DIR/$NAME.pub" | ||
chmod 0600 "$DIR/$NAME" | ||
chown sshd:sshd "$DIR/$NAME.pub" | ||
chown sshd:sshd "$DIR/$NAME" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
package/skeleton-init-finit/skeleton/etc/finit.d/available/sshd.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
task <pid/syslogd> \ | ||
[S] /usr/bin/ssh-hostkeys -- Verifying SSH host keys | ||
service <task/ssh-hostkeys/success> env:-/etc/default/sshd \ | ||
service <> env:-/etc/default/sshd \ | ||
[2345] /usr/sbin/sshd -D $SSHD_OPTS -- OpenSSH daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ MODULES=( | |
"[email protected]" | ||
"[email protected]" | ||
"[email protected]" | ||
"infix-services@2024-05-30.yang" | ||
"infix-services@2024-11-26.yang" | ||
"[email protected]" | ||
"[email protected]" | ||
"[email protected]" | ||
|
@@ -53,7 +53,7 @@ MODULES=( | |
"[email protected]" | ||
"[email protected] -e writable-running -e candidate -e rollback-on-error -e validate -e startup -e url -e xpath -e confirmed-commit" | ||
"[email protected] -e central-truststore-supported -e certificates" | ||
"[email protected] -e central-keystore-supported -e inline-definitions-supported -e asymmetric-keys -e symmetric-keys" | ||
"[email protected] -e central-keystore-supported -e asymmetric-keys -e symmetric-keys" | ||
"[email protected] -e server-ident-raw-public-key -e server-ident-x509-cert" | ||
|
||
) |
Oops, something went wrong.