Koozali.org: home of the SME Server

Affa 3 - affa --send-keys not working on non standard ssh port

Offline gieres

  • *
  • 213
  • +0/-0
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.

guest22

Re: Affa 3 - affa --send-keys not working on non standard ssh port
« Reply #1 on: August 10, 2016, 10:49:23 PM »
Good question. Please file a bug against the correct SME Server version.

Offline ldkeen

  • *
  • 403
  • +0/-0
Re: Affa 3 - affa --send-keys not working on non standard ssh port
« Reply #2 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.

Online ReetP

  • *
  • 3,749
  • +5/-0
Re: Affa 3 - affa --send-keys not working on non standard ssh port
« Reply #3 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.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

guest22

Re: Affa 3 - affa --send-keys not working on non standard ssh port
« Reply #4 on: August 18, 2016, 10:15:14 PM »
Which version is available in testing via the repo's please?

Online ReetP

  • *
  • 3,749
  • +5/-0
Re: Affa 3 - affa --send-keys not working on non standard ssh port
« Reply #5 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
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Online ReetP

  • *
  • 3,749
  • +5/-0
Re: Affa 3 - affa --send-keys not working on non standard ssh port
« Reply #6 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

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Online ReetP

  • *
  • 3,749
  • +5/-0
Re: Affa 3 - affa --send-keys not working on non standard ssh port
« Reply #7 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
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline gieres

  • *
  • 213
  • +0/-0
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.
« Last Edit: August 19, 2016, 09:16:39 PM by gieres »

guest22

Re: Affa 3 - affa --send-keys not working on non standard ssh port
« Reply #9 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.

guest22

Re: Affa 3 - affa --send-keys not working on non standard ssh port
« Reply #10 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.