Determine Stretch vs Jessie in Bash Script - Raspberry Pi Forums
what's correct way determine whether bash script running under stretch or jessie?
i'm running subtle differences. example, under jessie i've been enabling ssh login root user with:
sed -i 's/^permitrootlogin without-password$/permitrootlogin yes/' /etc/ssh/sshd_config
under stretch, 'permitrootlogin without-password' doesn't exist in /etc/ssh/sshd_config
under stretch, need add 'permitrootlogin yes'.
i'm running subtle differences. example, under jessie i've been enabling ssh login root user with:
sed -i 's/^permitrootlogin without-password$/permitrootlogin yes/' /etc/ssh/sshd_config
under stretch, 'permitrootlogin without-password' doesn't exist in /etc/ssh/sshd_config
under stretch, need add 'permitrootlogin yes'.
$ cat /etc/issue
or check if "permitrootlogin ..." exists in file , add if not.
of course root login on ssh discouraged practice.
or check if "permitrootlogin ..." exists in file , add if not.
of course root login on ssh discouraged practice.
raspberrypi
Comments
Post a Comment