From d2ec3c23b7bb1731778256635495d3989448ff2f Mon Sep 17 00:00:00 2001 From: Vitaly Lipatov Date: Wed, 17 Dec 2014 14:36:13 +0300 Subject: [PATCH] 0.0.3-alt7 - merge with ALT Linux Sisyphus - small fixes --- autosshd.spec | 8 +++++--- autosshd/etc/autossh.d/anyssh.ru.conf.template | 12 ++++++++---- autosshd/usr/bin/autosshd-auth | 2 +- autosshd/usr/bin/autosshd-ssh | 5 +++-- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/autosshd.spec b/autosshd.spec index 9d8bdd0..45d4b38 100755 --- a/autosshd.spec +++ b/autosshd.spec @@ -5,7 +5,7 @@ Name: autosshd Version: 0.0.3 -Release: alt6 +Release: alt7 Summary: System administration - AutoSSH system level service @@ -20,10 +20,9 @@ Source: %name-%version.tar BuildArch: noarch -PreReq: shadow-utils openssh-common - BuildPreReq: rpm-build-intro +Requires: shadow-utils openssh-common Requires: autossh %description @@ -90,6 +89,9 @@ cp share/autosshd.setup* %buildroot%_datadir/%name/ %_bindir/autosshd-ssh %changelog +* Wed Dec 17 2014 Vitaly Lipatov 0.0.3-alt7 +- small fixes + * Thu Nov 27 2014 Danil Mikhailov 0.0.3-alt6 - Cleanup git log diff --git a/autosshd/etc/autossh.d/anyssh.ru.conf.template b/autosshd/etc/autossh.d/anyssh.ru.conf.template index 400888f..67fc236 100644 --- a/autosshd/etc/autossh.d/anyssh.ru.conf.template +++ b/autosshd/etc/autossh.d/anyssh.ru.conf.template @@ -1,14 +1,18 @@ # Config for autossh pretuned for anyssh.ru service # Manual: http://wiki.etersoft.ru/Autosshd -#For connect to anyssh.ru you need type user number and copy key #3 +# For connect to anyssh.ru you need type user number and copy key #3 REMOTESSH_USER_NUMBER=XXX -#The main connection parameters: +# The main connection parameters: #1. Set remote host address or corresponding ip: -HOST=anyssh.eterhost.ru +HOST=anyssh.ru + +# Note: It is not needed usually to change follow lines + #2. Create user or use an existing one on the remote host and write down the login here: REMOTESSH_USER=a$REMOTESSH_USER_NUMBER + #3. Copy user private key file (id_dsa) from $HOST to /var/lib/autosshd/.ssh directory and check unix permissions: it must be 0600 REMOTE_KEY=/var/lib/autosshd/.ssh/id_dsa.anyssh.ru.$REMOTESSH_USER @@ -20,4 +24,4 @@ AUTOSSH_PORT=11$REMOTESSH_USER_NUMBER #monitoring local port (port+1 will used AUTOSTART=yes SSH_OPTIONS="-N -i ${REMOTE_KEY} -R ${REMOTE_PORT}:localhost:${LOCAL_PORT} ${REMOTESSH_USER}@${HOST} -o StrictHostKeychecking=no" -AUTOSSH_OPTIONS="-M ${AUTOSSH_PORT} -f ${SSH_OPTIONS}" \ No newline at end of file +AUTOSSH_OPTIONS="-M ${AUTOSSH_PORT} -f ${SSH_OPTIONS}" diff --git a/autosshd/usr/bin/autosshd-auth b/autosshd/usr/bin/autosshd-auth index dc1fbd8..be5323f 100755 --- a/autosshd/usr/bin/autosshd-auth +++ b/autosshd/usr/bin/autosshd-auth @@ -9,4 +9,4 @@ scp defautl@anyssh.ru:/home/aXXX/anyssh.ru.conf /etc/autossh.d/anyssh.ru.conf scp defautl@anyssh.ru:/home/aXXX/.ssh/key /home/aXXX/.ssh/key #4) Запуск serv autossd on -serv autossd start \ No newline at end of file +serv autossd start diff --git a/autosshd/usr/bin/autosshd-ssh b/autosshd/usr/bin/autosshd-ssh index f308679..1d25f08 100755 --- a/autosshd/usr/bin/autosshd-ssh +++ b/autosshd/usr/bin/autosshd-ssh @@ -2,7 +2,8 @@ help(){ echo \ -"Usage: ${0##*/} SERVER +"Connect with ssh parameters from config file. +Usage: ${0##*/} SERVER SERVER - name of anysshd conf file Example: ${0##*/} anyssh.ru # if exist config /etc/autossh.d/anyssh.ru.conf" @@ -13,4 +14,4 @@ if [ -n "$1" ] ; then ssh ${SSH_OPTIONS} else help -fi \ No newline at end of file +fi -- 2.11.4.GIT