Koozali.org: home of the SME Server

Obsolete Releases => SME 9.x Contribs => Topic started by: gieres on August 10, 2016, 10:05:36 PM

Title: Affa 3 - affa --send-keys not working on non standard ssh port
Post by: gieres on August 10, 2016, 10:05:36 PM
Hi,

Has anybody solved this problem for SME9 as it was solved for SME8 in https://bugs.contribs.org/show_bug.cgi?id=8904, see comment 7 of Arnaud ?

Version smeserver-affa-3.2.2.4-3.el6.noarch is installed and I can't send keys.

Code: [Select]
[root@sme ~]# affa --send-key JOB
Job JOB: usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b
bind_address] [-c cipher_spec]
           [-D [bind_address:]port] [-e escape_char] [-F configfile]
           [-I pkcs11] [-i identity_file]
           [-L [bind_address:]port:host:hostport]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-R [bind_address:]port:host:hostport] [-S ctl_path]
           [-W host:port] [-w local_tun[:remote_tun]]
           [user@]hostname [command]
Sending public key to 82.225.y.z failed.

Thanks.
Title: Re: Affa 3 - affa --send-keys not working on non standard ssh port
Post by: guest22 on August 10, 2016, 10:49:23 PM
Good question. Please file a bug against the correct SME Server version.
Title: Re: Affa 3 - affa --send-keys not working on non standard ssh port
Post by: ldkeen on August 17, 2016, 05:31:08 AM
Easiest way to do it is to add the port setting into the conf file:
#mcedit /etc/affa/myjob.conf
and add the following
sshPort=222
That should fix the problem.
Title: Re: Affa 3 - affa --send-keys not working on non standard ssh port
Post by: ReetP on August 18, 2016, 09:10:03 PM
I think there is rpm in testing but I need to look. Will try later.

If there is it needs verifying and this would be a good test.
Title: Re: Affa 3 - affa --send-keys not working on non standard ssh port
Post by: guest22 on August 18, 2016, 10:15:14 PM
Which version is available in testing via the repo's please?
Title: Re: Affa 3 - affa --send-keys not working on non standard ssh port
Post by: ReetP on August 19, 2016, 12:27:43 AM
I can see this bug has been added

https://bugs.contribs.org/show_bug.cgi?id=9742

I need to have a look via my desktop tommorow to see what is going on

Rgds
John
Title: Re: Affa 3 - affa --send-keys not working on non standard ssh port
Post by: ReetP on August 19, 2016, 01:01:04 AM
Version smeserver-affa-3.2.2.4-3.el6.noarch is installed and I can't send keys.

The latest version I can see in CVS is:

smeserver-affa-3.2.2.3

You show

smeserver-affa-3.2.2.4-3

I'm not sure where you got that from.

Either way, having looked in CVS it looks like the patch suggested in https://bugs.contribs.org/show_bug.cgi?id=8904 was never applied

You need to find the following line around line 3016:

Code: [Select]
my $cmd="/bin/cat $kf | /usr/bin/ssh $job{'_sshOpts'} -q $job{'remoteUser'}\@$job{'remoteHostName'} 'cat - > /tmp/$SystemName.\$\$ && $mkdirstr touch $ak && grep -v \"$pubk\" < $ak >> /tmp/$SystemName.\$\$ ; mv -f /tmp/$SystemName.\$\$ $ak'";

And change it to this (note the additional -p $job{'sshPort'} ):

Code: [Select]
my $cmd="/bin/cat $kf | /usr/bin/ssh $job{'_sshOpts'} -q -p $job{'sshPort'} $job{'remoteUser'}\@$job{'remoteHostName'} 'cat - > /tmp/$SystemName.\$\$ && $mkdirstr touch $ak && grep -v \"$pubk\" < $ak >> /tmp/$SystemName.\$\$ ; mv -f /tmp/$SystemName.\$\$ $ak'";
I'll update the bugs accordingly and will try and push a patch tomorrow.

B. Rgds
John

Title: Re: Affa 3 - affa --send-keys not working on non standard ssh port
Post by: ReetP on August 19, 2016, 01:37:58 AM
I got bored :-)

Patches for both v8 and v9 are in smetest

Please verify them

Rgds
John
Title: [SOLVED ?] Re: Affa 3 - affa --send-keys not working on non standard ssh port
Post by: gieres on August 19, 2016, 09:14:21 PM
Hello,
Patch for SME 9 tested this afternoon.
It works fine.

Code: [Select]
Affa job 'JOB' successfully completed.

Affa version 3.2.2.3-5 on mon_test
+----------------------------------------------------------------------------------------------------------------+
| Job: JOB                                                                                                |
| Description: sauvegarde locale du serveur SME de La Tronche                                                    |
| Directory: /var/affa/mon_test/                                                                               |
| Hostname: 192.168.x.y                                                                                         |
| Email: root,gieres@aliceadsl.fr,admin@z.homelinux.com                                          |
+----------------------------------------------------------------------------------------------------------------+
| Run   | Completion date                           |    buTime | ddTime | ddYld | Files |  Size |  Sent | Recvd |
+----------------------------------------------------------------------------------------------------------------+
| D 0  | Fri 2016-08-19 16:30                       |     7m24s |      - |     - |   17k |  2.4G |  307k |  1.4G |
+----------------------------------------------------------------------------------------------------------------+
| S 0  | Fri 2016-08-19 21:01                       |     4h14m |      - |     - |  359k |  104G |   12M |   56G |
+----------------------------------------------------------------------------------------------------------------+


Disk Usage:
Affa version 3.2.2.3-5 on mon_test
+------+--------+--------+----------------------------------------------------+
| Use% |   Used |  Avail | Root Dir                                           |
+------+--------+--------+----------------------------------------------------+
|  10% |    93G |   775G | /var/affa                                          |
+------+--------+--------+----------------------------------------------------+

You will receive 8 further success notifications.

Thanks.
Title: Re: Affa 3 - affa --send-keys not working on non standard ssh port
Post by: guest22 on August 19, 2016, 11:05:54 PM
I believe we need more thorough verification for such an important contrib. There is a procedure on the wiki for contribs verifications and acceptance.
Title: Re: Affa 3 - affa --send-keys not working on non standard ssh port
Post by: guest22 on August 19, 2016, 11:07:26 PM
AND we need to verify the maintainer. Attaching some new versions to a bug report is NOT the proper procedure.