From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- .../openssh/add-test-support-for-busybox.patch | 47 -------- ...able-ciphers-not-supported-by-OpenSSL-DES.patch | 39 ------ ...ial-signed-overflow-in-pointer-arithmatic.patch | 99 ---------------- .../meta/recipes-connectivity/openssh/openssh/init | 90 -------------- .../recipes-connectivity/openssh/openssh/run-ptest | 44 ------- .../openssh/openssh/ssh_config | 48 -------- .../meta/recipes-connectivity/openssh/openssh/sshd | 10 -- .../openssh/openssh/sshd.socket | 10 -- .../openssh/openssh/sshd@.service | 13 -- .../openssh/openssh/sshd_check_keys | 90 -------------- .../openssh/openssh/sshd_config | 132 --------------------- .../openssh/openssh/sshdgenkeys.service | 8 -- .../openssh/openssh/volatiles.99_sshd | 2 - 13 files changed, 632 deletions(-) delete mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/disable-ciphers-not-supported-by-OpenSSL-DES.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch delete mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/init delete mode 100755 import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/run-ptest delete mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/ssh_config delete mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd delete mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd.socket delete mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd@.service delete mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd_check_keys delete mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd_config delete mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service delete mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/volatiles.99_sshd (limited to 'import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh') diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch deleted file mode 100644 index b8402a4de..000000000 --- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch +++ /dev/null @@ -1,47 +0,0 @@ -Adjust test cases to work with busybox. - -- Replace dd parameter "obs" with "bs". -- Replace "head -" with "head -n ". - -Signed-off-by: Maxin B. John -Upstream-Status: Pending - -Index: openssh-7.6p1/regress/cipher-speed.sh -=================================================================== ---- openssh-7.6p1.orig/regress/cipher-speed.sh -+++ openssh-7.6p1/regress/cipher-speed.sh -@@ -17,7 +17,7 @@ for c in `${SSH} -Q cipher`; do n=0; for - printf "%-60s" "$c/$m:" - ( ${SSH} -o 'compression no' \ - -F $OBJ/ssh_proxy -m $m -c $c somehost \ -- exec sh -c \'"dd of=/dev/null obs=32k"\' \ -+ exec sh -c \'"dd of=/dev/null bs=32k"\' \ - < ${DATA} ) 2>&1 | getbytes - - if [ $? -ne 0 ]; then -Index: openssh-7.6p1/regress/transfer.sh -=================================================================== ---- openssh-7.6p1.orig/regress/transfer.sh -+++ openssh-7.6p1/regress/transfer.sh -@@ -13,7 +13,7 @@ cmp ${DATA} ${COPY} || fail "corrupted - for s in 10 100 1k 32k 64k 128k 256k; do - trace "dd-size ${s}" - rm -f ${COPY} -- dd if=$DATA obs=${s} 2> /dev/null | \ -+ dd if=$DATA bs=${s} 2> /dev/null | \ - ${SSH} -q -F $OBJ/ssh_proxy somehost "cat > ${COPY}" - if [ $? -ne 0 ]; then - fail "ssh cat $DATA failed" -Index: openssh-7.6p1/regress/key-options.sh -=================================================================== ---- openssh-7.6p1.orig/regress/key-options.sh -+++ openssh-7.6p1/regress/key-options.sh -@@ -47,7 +47,7 @@ for f in 127.0.0.1 '127.0.0.0\/8'; do - fi - - sed 's/.*/from="'"$f"'" &/' $origkeys >$authkeys -- from=`head -1 $authkeys | cut -f1 -d ' '` -+ from=`head -n 1 $authkeys | cut -f1 -d ' '` - verbose "key option $from" - r=`${SSH} -q -F $OBJ/ssh_proxy somehost 'echo true'` - if [ "$r" = "true" ]; then diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/disable-ciphers-not-supported-by-OpenSSL-DES.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/disable-ciphers-not-supported-by-OpenSSL-DES.patch deleted file mode 100644 index 8a2d1a0a7..000000000 --- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/disable-ciphers-not-supported-by-OpenSSL-DES.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 265eaab8b39d8d8721224a48eefed5bf1696d353 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Wed, 18 Apr 2018 21:58:32 +0800 -Subject: [PATCH] disable ciphers not supported by OpenSSL DES - -While compiling openssl with option `no-des', it caused the openssh -build failure -... -cipher.c:85:41: error: 'EVP_des_ede3_cbc' undeclared here (not in a function); -... - -OpenSSL configured that way defines OPENSSL_NO_DES to disable des - -Suggested by dtucker@ - -Upstream-Status: Submitted [openssh-unix-dev@mindrot.org] - -Signed-off-by: Hongxu Jia ---- - cipher.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/cipher.c b/cipher.c -index c3cd5dc..86558e1 100644 ---- a/cipher.c -+++ b/cipher.c -@@ -82,7 +82,9 @@ struct sshcipher { - - static const struct sshcipher ciphers[] = { - #ifdef WITH_OPENSSL -+#ifndef OPENSSL_NO_DES - { "3des-cbc", 8, 24, 0, 0, CFLAG_CBC, EVP_des_ede3_cbc }, -+#endif - { "aes128-cbc", 16, 16, 0, 0, CFLAG_CBC, EVP_aes_128_cbc }, - { "aes192-cbc", 16, 24, 0, 0, CFLAG_CBC, EVP_aes_192_cbc }, - { "aes256-cbc", 16, 32, 0, 0, CFLAG_CBC, EVP_aes_256_cbc }, --- -2.7.4 - diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch deleted file mode 100644 index 7e043a2db..000000000 --- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 3328e98bcbf2930cd7eea3e6c92ad5dcbdf4794f Mon Sep 17 00:00:00 2001 -From: Yuanjie Huang -Date: Wed, 24 Aug 2016 03:15:43 +0000 -Subject: [PATCH] Fix potential signed overflow in pointer arithmatic - -Pointer arithmatic results in implementation defined signed integer -type, so that 's - src' in strlcpy and others may trigger signed overflow. -In case of compilation by gcc or clang with -ftrapv option, the overflow -would lead to program abort. - -Upstream-Status: Submitted [http://bugzilla.mindrot.org/show_bug.cgi?id=2608] - -Signed-off-by: Yuanjie Huang ---- - openbsd-compat/strlcat.c | 8 ++++++-- - openbsd-compat/strlcpy.c | 8 ++++++-- - openbsd-compat/strnlen.c | 8 ++++++-- - 3 files changed, 18 insertions(+), 6 deletions(-) - -diff --git a/openbsd-compat/strlcat.c b/openbsd-compat/strlcat.c -index bcc1b61..e758ebf 100644 ---- a/openbsd-compat/strlcat.c -+++ b/openbsd-compat/strlcat.c -@@ -23,6 +23,7 @@ - - #include - #include -+#include - - /* - * Appends src to string dst of size siz (unlike strncat, siz is the -@@ -55,8 +56,11 @@ strlcat(char *dst, const char *src, size_t siz) - s++; - } - *d = '\0'; -- -- return(dlen + (s - src)); /* count does not include NUL */ -+ /* -+ * Cast pointers to unsigned type before calculation, to avoid signed -+ * overflow when the string ends where the MSB has changed. -+ */ -+ return (dlen + ((uintptr_t)s - (uintptr_t)src)); /* count does not include NUL */ - } - - #endif /* !HAVE_STRLCAT */ -diff --git a/openbsd-compat/strlcpy.c b/openbsd-compat/strlcpy.c -index b4b1b60..b06f374 100644 ---- a/openbsd-compat/strlcpy.c -+++ b/openbsd-compat/strlcpy.c -@@ -23,6 +23,7 @@ - - #include - #include -+#include - - /* - * Copy src to string dst of size siz. At most siz-1 characters -@@ -51,8 +52,11 @@ strlcpy(char *dst, const char *src, size_t siz) - while (*s++) - ; - } -- -- return(s - src - 1); /* count does not include NUL */ -+ /* -+ * Cast pointers to unsigned type before calculation, to avoid signed -+ * overflow when the string ends where the MSB has changed. -+ */ -+ return ((uintptr_t)s - (uintptr_t)src - 1); /* count does not include NUL */ - } - - #endif /* !HAVE_STRLCPY */ -diff --git a/openbsd-compat/strnlen.c b/openbsd-compat/strnlen.c -index 93d5155..9b8de5d 100644 ---- a/openbsd-compat/strnlen.c -+++ b/openbsd-compat/strnlen.c -@@ -23,6 +23,7 @@ - #include - - #include -+#include - - size_t - strnlen(const char *str, size_t maxlen) -@@ -31,7 +32,10 @@ strnlen(const char *str, size_t maxlen) - - for (cp = str; maxlen != 0 && *cp != '\0'; cp++, maxlen--) - ; -- -- return (size_t)(cp - str); -+ /* -+ * Cast pointers to unsigned type before calculation, to avoid signed -+ * overflow when the string ends where the MSB has changed. -+ */ -+ return (size_t)((uintptr_t)cp - (uintptr_t)str); - } - #endif --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/init b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/init deleted file mode 100644 index 34ba0f846..000000000 --- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/init +++ /dev/null @@ -1,90 +0,0 @@ -#! /bin/sh -set -e - -PIDFILE=/var/run/sshd.pid - -# source function library -. /etc/init.d/functions - -# /etc/init.d/ssh: start and stop the OpenBSD "secure shell" daemon - -test -x /usr/sbin/sshd || exit 0 -( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0 - -# /etc/default/ssh may set SYSCONFDIR and SSHD_OPTS -if test -f /etc/default/ssh; then - . /etc/default/ssh -fi - -[ -z "$SYSCONFDIR" ] && SYSCONFDIR=/etc/ssh -mkdir -p $SYSCONFDIR - -check_for_no_start() { - # forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists - if [ -e $SYSCONFDIR/sshd_not_to_be_run ]; then - echo "OpenBSD Secure Shell server not in use ($SYSCONFDIR/sshd_not_to_be_run)" - exit 0 - fi -} - -check_privsep_dir() { - # Create the PrivSep empty dir if necessary - if [ ! -d /var/run/sshd ]; then - mkdir /var/run/sshd - chmod 0755 /var/run/sshd - fi -} - -check_config() { - /usr/sbin/sshd -t $SSHD_OPTS || exit 1 -} - -export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" - -case "$1" in - start) - check_for_no_start - echo "Starting OpenBSD Secure Shell server: sshd" - @LIBEXECDIR@/sshd_check_keys - check_privsep_dir - start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS - echo "done." - ;; - stop) - echo -n "Stopping OpenBSD Secure Shell server: sshd" - start-stop-daemon -K -p $PIDFILE -x /usr/sbin/sshd - echo "." - ;; - - reload|force-reload) - check_for_no_start - @LIBEXECDIR@/sshd_check_keys - check_config - echo -n "Reloading OpenBSD Secure Shell server's configuration" - start-stop-daemon -K -p $PIDFILE -s 1 -x /usr/sbin/sshd - echo "." - ;; - - restart) - @LIBEXECDIR@/sshd_check_keys - check_config - echo -n "Restarting OpenBSD Secure Shell server: sshd" - start-stop-daemon -K -p $PIDFILE --oknodo -x /usr/sbin/sshd - check_for_no_start - check_privsep_dir - sleep 2 - start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS - echo "." - ;; - - status) - status /usr/sbin/sshd - exit $? - ;; - - *) - echo "Usage: /etc/init.d/ssh {start|stop|status|reload|force-reload|restart}" - exit 1 -esac - -exit 0 diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/run-ptest b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/run-ptest deleted file mode 100755 index 36a3d2a7b..000000000 --- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/run-ptest +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -export TEST_SHELL=sh - -cd regress -sed -i "/\t\tagent-ptrace /d" Makefile -make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \ - | sed -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g' - -SSHAGENT=`which ssh-agent` -GDB=`which gdb` - -if [ -z "${SSHAGENT}" -o -z "${GDB}" ]; then - echo "SKIP: agent-ptrace" - exit -fi - -useradd openssh-test - -eval `su -c "${SSHAGENT} -s" openssh-test` > /dev/null -r=$? -if [ $r -ne 0 ]; then - echo "FAIL: could not start ssh-agent: exit code $r" -else - su -c "gdb -p ${SSH_AGENT_PID}" openssh-test > /tmp/gdb.out 2>&1 << EOF - quit -EOF - r=$? - if [ $r -ne 0 ]; then - echo "gdb failed: exit code $r" - fi - egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.|Unable to access task ' >/dev/null /tmp/gdb.out - r=$? - rm -f /tmp/gdb.out - if [ $r -ne 0 ]; then - echo "FAIL: ptrace agent" - else - echo "PASS: ptrace agent" - fi - - ${SSHAGENT} -k > /dev/null -fi -userdel openssh-test - diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/ssh_config b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/ssh_config deleted file mode 100644 index 9e919156d..000000000 --- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/ssh_config +++ /dev/null @@ -1,48 +0,0 @@ -# $OpenBSD: ssh_config,v 1.28 2013/09/16 11:35:43 sthen Exp $ - -# This is the ssh client system-wide configuration file. See -# ssh_config(5) for more information. This file provides defaults for -# users, and the values can be changed in per-user configuration files -# or on the command line. - -# Configuration data is parsed as follows: -# 1. command line options -# 2. user-specific file -# 3. system-wide file -# Any configuration value is only changed the first time it is set. -# Thus, host-specific definitions should be at the beginning of the -# configuration file, and defaults at the end. - -# Site-wide defaults for some commonly used options. For a comprehensive -# list of available options, their meanings and defaults, please see the -# ssh_config(5) man page. - -Host * - ForwardAgent yes - ForwardX11 yes -# RhostsRSAAuthentication no -# RSAAuthentication yes -# PasswordAuthentication yes -# HostbasedAuthentication no -# GSSAPIAuthentication no -# GSSAPIDelegateCredentials no -# BatchMode no -# CheckHostIP yes -# AddressFamily any -# ConnectTimeout 0 -# StrictHostKeyChecking ask -# IdentityFile ~/.ssh/identity -# IdentityFile ~/.ssh/id_rsa -# IdentityFile ~/.ssh/id_dsa -# Port 22 -# Protocol 2,1 -# Cipher 3des -# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc -# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160 -# EscapeChar ~ -# Tunnel no -# TunnelDevice any:any -# PermitLocalCommand no -# VisualHostKey no -# ProxyCommand ssh -q -W %h:%p gateway.example.com -# RekeyLimit 1G 1h diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd deleted file mode 100644 index 4882e58b4..000000000 --- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd +++ /dev/null @@ -1,10 +0,0 @@ -#%PAM-1.0 - -auth include common-auth -account required pam_nologin.so -account include common-account -password include common-password -session optional pam_keyinit.so force revoke -session include common-session -session required pam_loginuid.so - diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd.socket b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd.socket deleted file mode 100644 index 12c39b26b..000000000 --- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd.socket +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Conflicts=sshd.service - -[Socket] -ExecStartPre=@BASE_BINDIR@/mkdir -p /var/run/sshd -ListenStream=22 -Accept=yes - -[Install] -WantedBy=sockets.target diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd@.service b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd@.service deleted file mode 100644 index 9d83dfb2b..000000000 --- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd@.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=OpenSSH Per-Connection Daemon -Wants=sshdgenkeys.service -After=sshdgenkeys.service - -[Service] -Environment="SSHD_OPTS=" -EnvironmentFile=-/etc/default/ssh -ExecStart=-@SBINDIR@/sshd -i $SSHD_OPTS -ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID -StandardInput=socket -StandardError=syslog -KillMode=process diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd_check_keys b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd_check_keys deleted file mode 100644 index 5463b1a4c..000000000 --- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd_check_keys +++ /dev/null @@ -1,90 +0,0 @@ -#! /bin/sh - -generate_key() { - local FILE=$1 - local TYPE=$2 - local DIR="$(dirname "$FILE")" - - mkdir -p "$DIR" - ssh-keygen -q -f "${FILE}.tmp" -N '' -t $TYPE - - # Atomically rename file public key - mv -f "${FILE}.tmp.pub" "${FILE}.pub" - - # This sync does double duty: Ensuring that the data in the temporary - # private key file is on disk before the rename, and ensuring that the - # public key rename is completed before the private key rename, since we - # switch on the existence of the private key to trigger key generation. - # This does mean it is possible for the public key to exist, but be garbage - # but this is OK because in that case the private key won't exist and the - # keys will be regenerated. - # - # In the event that sync understands arguments that limit what it tries to - # fsync(), we provided them. If it does not, it will simply call sync() - # which is just as well - sync "${FILE}.pub" "$DIR" "${FILE}.tmp" - - mv "${FILE}.tmp" "$FILE" - - # sync to ensure the atomic rename is committed - sync "$DIR" -} - -# /etc/default/ssh may set SYSCONFDIR and SSHD_OPTS -if test -f /etc/default/ssh; then - . /etc/default/ssh -fi - -[ -z "$SYSCONFDIR" ] && SYSCONFDIR=/etc/ssh -mkdir -p $SYSCONFDIR - -# parse sshd options -set -- ${SSHD_OPTS} -- -sshd_config=/etc/ssh/sshd_config -while true ; do - case "$1" in - -f*) if [ "$1" = "-f" ] ; then - sshd_config="$2" - shift - else - sshd_config="${1#-f}" - fi - shift - ;; - --) shift; break;; - *) shift;; - esac -done - -# parse location of keys -HOST_KEY_RSA=$(grep ^HostKey "${sshd_config}" | grep _rsa_ | tail -1 | awk ' { print $2 } ') -[ -z "${HOST_KEY_RSA}" ] && HOST_KEY_RSA=$(grep HostKey "${sshd_config}" | grep _rsa_ | tail -1 | awk ' { print $2 } ') -[ -z "${HOST_KEY_RSA}" ] && HOST_KEY_RSA=$SYSCONFDIR/ssh_host_rsa_key -HOST_KEY_DSA=$(grep ^HostKey "${sshd_config}" | grep _dsa_ | tail -1 | awk ' { print $2 } ') -[ -z "${HOST_KEY_DSA}" ] && HOST_KEY_DSA=$(grep HostKey "${sshd_config}" | grep _dsa_ | tail -1 | awk ' { print $2 } ') -[ -z "${HOST_KEY_DSA}" ] && HOST_KEY_DSA=$SYSCONFDIR/ssh_host_dsa_key -HOST_KEY_ECDSA=$(grep ^HostKey "${sshd_config}" | grep _ecdsa_ | tail -1 | awk ' { print $2 } ') -[ -z "${HOST_KEY_ECDSA}" ] && HOST_KEY_ECDSA=$(grep HostKey "${sshd_config}" | grep _ecdsa_ | tail -1 | awk ' { print $2 } ') -[ -z "${HOST_KEY_ECDSA}" ] && HOST_KEY_ECDSA=$SYSCONFDIR/ssh_host_ecdsa_key -HOST_KEY_ED25519=$(grep ^HostKey "${sshd_config}" | grep _ed25519_ | tail -1 | awk ' { print $2 } ') -[ -z "${HOST_KEY_ED25519}" ] && HOST_KEY_ED25519=$(grep HostKey "${sshd_config}" | grep _ed25519_ | tail -1 | awk ' { print $2 } ') -[ -z "${HOST_KEY_ED25519}" ] && HOST_KEY_ED25519=$SYSCONFDIR/ssh_host_ed25519_key - -# create keys if necessary -if [ ! -f $HOST_KEY_RSA ]; then - echo " generating ssh RSA key..." - generate_key $HOST_KEY_RSA rsa -fi -if [ ! -f $HOST_KEY_ECDSA ]; then - echo " generating ssh ECDSA key..." - generate_key $HOST_KEY_ECDSA ecdsa -fi -if [ ! -f $HOST_KEY_DSA ]; then - echo " generating ssh DSA key..." - generate_key $HOST_KEY_DSA dsa -fi -if [ ! -f $HOST_KEY_ED25519 ]; then - echo " generating ssh ED25519 key..." - generate_key $HOST_KEY_ED25519 ed25519 -fi - diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd_config b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd_config deleted file mode 100644 index 31fe5d924..000000000 --- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshd_config +++ /dev/null @@ -1,132 +0,0 @@ -# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $ - -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. - -# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin - -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options change a -# default value. - -#Port 22 -#AddressFamily any -#ListenAddress 0.0.0.0 -#ListenAddress :: - -# The default requires explicit activation of protocol 1 -Protocol 2 - -# HostKey for protocol version 1 -#HostKey /etc/ssh/ssh_host_key -# HostKeys for protocol version 2 -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_dsa_key -#HostKey /etc/ssh/ssh_host_ecdsa_key -#HostKey /etc/ssh/ssh_host_ed25519_key - -# Lifetime and size of ephemeral version 1 server key -#KeyRegenerationInterval 1h -#ServerKeyBits 1024 - -# Ciphers and keying -#RekeyLimit default none - -# Logging -# obsoletes QuietMode and FascistLogging -#SyslogFacility AUTH -#LogLevel INFO - -# Authentication: - -#LoginGraceTime 2m -#PermitRootLogin yes -#StrictModes yes -#MaxAuthTries 6 -#MaxSessions 10 - -#RSAAuthentication yes -#PubkeyAuthentication yes - -# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 -# but this is overridden so installations will only check .ssh/authorized_keys -AuthorizedKeysFile .ssh/authorized_keys - -#AuthorizedPrincipalsFile none - -#AuthorizedKeysCommand none -#AuthorizedKeysCommandUser nobody - -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#RhostsRSAAuthentication no -# similar for protocol version 2 -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# RhostsRSAAuthentication and HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes - -# To disable tunneled clear text passwords, change to no here! -#PasswordAuthentication yes -#PermitEmptyPasswords no - -# Change to no to disable s/key passwords -ChallengeResponseAuthentication no - -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no - -# GSSAPI options -#GSSAPIAuthentication no -#GSSAPICleanupCredentials yes - -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -#UsePAM no - -#AllowAgentForwarding yes -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding no -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PermitTTY yes -#PrintMotd yes -#PrintLastLog yes -#TCPKeepAlive yes -#UseLogin no -#PermitUserEnvironment no -Compression no -ClientAliveInterval 15 -ClientAliveCountMax 4 -#UseDNS yes -#PidFile /var/run/sshd.pid -#MaxStartups 10:30:100 -#PermitTunnel no -#ChrootDirectory none -#VersionAddendum none - -# no default banner path -#Banner none - -# override default of no subsystems -Subsystem sftp /usr/libexec/sftp-server - -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# PermitTTY no -# ForceCommand cvs server diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service deleted file mode 100644 index 603c33787..000000000 --- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=OpenSSH Key Generation -RequiresMountsFor=/var /run - -[Service] -ExecStart=@LIBEXECDIR@/sshd_check_keys -Type=oneshot -RemainAfterExit=yes diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/volatiles.99_sshd b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/volatiles.99_sshd deleted file mode 100644 index a0d2af3c6..000000000 --- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/volatiles.99_sshd +++ /dev/null @@ -1,2 +0,0 @@ -d root root 0755 /var/run/sshd none -f root root 0644 /var/log/lastlog none -- cgit v1.2.1