Displaying 5 results from an estimated 5 matches for "toggle_ssh_access".
2009 Jul 06
0
[PATCH node] Disables SSH by default, and allows for enabling at firstboot. rhbz#509842
..."$*"; exit 1; }
+
+WORKDIR=$(mktemp -d) || exit 1
+
+# Remove $WORKDIR upon interrupt (and HUP, PIPE, TERM) and upon normal
+# termination, being careful not to change the exit status.
+trap '__st=$?; rm -rf "$WORKDIR"; exit $__st' 0
+trap 'exit $?' 1 2 13 15
+
+toggle_ssh_access ()
+{
+ local allowed=$1
+ local config=$WORKDIR/augeas-ssh
+
+ if $allowed; then permit="yes"; else permit="no"; fi
+ printf "set /files/etc/ssh/sshd_config/PermitRootLogin ${permit}\n" > $config
+ cat $config | augtool
+
+ service sshd restart
+}...
2010 Oct 27
0
[PATCH node] add password.py
...passwd, password)
+ ovirt_store_config("/etc/shadow")
+
+def check_ssh_password_auth(self):
+ password_auth_status = augeas.Augeas("root=/")
+ password_auth_status.get("/files/etc/ssh/sshd_config/PasswordAuthentication")
+ return password_auth_status
+
+def toggle_ssh_access(status):
+ ssh_config = augeas.Augeas("root=/")
+ ssh_config.set("/files/etc/ssh/sshd_config", status)
+ ssh_config.save()
+ ovirt_store_config("/etc/ssh/sshd_config")
+ os.system("service sshd reload")
+
+def set_sasl_password(user, password):...
2009 Jul 21
0
[PATCH node] Adds a new kernel cmdline argument to toggle SSH password auth.
...quot;
- select option in "$PASSWORD" "$SSH" "$QUIT"
- do
- case $option in
- $PASSWORD) set_password; break;;
- $SSH) toggle_ssh; break;;
- $QUIT) exit;;
- esac
+if [[ "$1" == "AUTO" ]]; then
+ toggle_ssh_access $OVIRT_SSH
+else
+ while true; do
+ state="disabled"
+ /usr/bin/augtool get /files/etc/ssh/sshd_config/PasswordAuthentication|grep -q yes$
+ if [ $? == 0 ]; then
+ state="enabled"
+ fi
+ printf "\nSSH password authentication is currently ${state}.\n\n"
+...
2009 Jul 22
1
Updated patch...
This patch obsoletes the previous, renaming the karg to ssh_pwauth.
2009 Jul 22
1
Changes the ssh karg to ssh_pwauth
This patch obsoletes the previous one with feedback from pmyers at redhat.com.