Commit Graph

21 Commits

Author SHA1 Message Date
Sergey Ponomarev 9130a94425 sshtunnel: update to v5.2
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-12-27 17:31:33 +00:00
Sergey Ponomarev 28e8daf726 sshtunnel: simplify command composition
Remove append_params and use shell expressions instead e.g. ${port:+-p $port}.

Note that we can't do that with ProxyCommand because it has to be quoted.

The order of options was changed from more important like hostname to just static -nN.

The CompressionLevel option is removed from SSH2.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-12-27 17:31:33 +00:00
Sergey Ponomarev d1d1bd60c9 sshtunnel: ProxyCommand option
The ProxyCommand may have spaces so it must be quoted.
So we must use the procd_append_param.
Currently the option is not supported by Dropbear.
But it has -J instead which in OpenSSH means ProxyJump.
So we can't use it to avoid conflict.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-12-27 17:31:33 +00:00
Sergey Ponomarev fdaf530950 sshtunnel: update version to 5.1
Make it depends on ether Dropbear dbclient or OpenSSH client

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-10-08 10:29:37 +01:00
Sergey Ponomarev 1a92dbcf32 sshtunnel: allow empty port and user
A user may have some host configured in the .ssh/config with user and port.
But we anyway have to specify them in the sshtunnel.
The change fixes this

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-10-08 10:29:37 +01:00
Sergey Ponomarev 9ea6f35194 sshtunnel: add enabled option
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-10-08 10:29:37 +01:00
Sergey Ponomarev 9dd8a62238 sshtunnel: allow empty remoteaddress
Just empty or * may have some semantic difference on a server

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-10-08 10:29:37 +01:00
Sergey Ponomarev 1d9f10a135 sshtunnel: StrictHostKeyChecking for Dropbear
The dbclient doesn't support the -o StrictHostKeyChecking but it has it's own -y option:
-y    Always accept remote host key if unknown
-y -y Don't perform any remote host key checking (caution)

So we can add these options to make the StrictHostKeyChecking working.
The dbclient will ignore -o StrictHostKeyChecking but use the -y or -yy instead.

The only problem is that the -y flag is also used by the openssh-client:

-y Send log information using the syslog(3) system module.  By default this information is sent to stderr.

This is not critical and once the dbclient start to support the StrictHostKeyChecking we can remove the -y flag.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-10-08 10:29:37 +01:00
Sergey Ponomarev f14dae7bc9 sshtunnel: Use -i $IdentityFile instead of -o IdentityFile=$IdentityFile
This makes the sshtunnel compatible with Dropbear.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-10-08 10:29:37 +01:00
Sergey Ponomarev 714c97b012 sshtunnel: set StrictHostKeyChecking=accept-new by default
Without the option the ssh will propt a user to accept the host key.
So a user should perform a connection manualy and accept before useing the sshtunnel.
The accept-new is a reasonable trade off.

Also the LogLevel is INFO by default.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-10-08 10:29:37 +01:00
Sergey Ponomarev 2a5f9dbcc7 sshtunnel: uci_sshtunnel use example.com
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-10-08 10:29:37 +01:00
Sergey Ponomarev 41635f946c sshtunnel: uci_sshtunnel simplify
Simplify comment and make it shorter.
Remove triling tab after retrydelay.
Use a full path for IdentityFile because otherwise the uci validation fails with the relative path ~/.ssh

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-10-08 10:29:37 +01:00
Stefan Weil 32af3694fc sshtunnel: fix type, case and whitespace issues
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2023-04-15 16:49:30 +01:00
Rosen Penev ad97672726 sshtunnel: correct access of config file
With this change the `/etc/config/sshtunnel` file has the correct access.
It's a sensible file.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-08-24 13:49:45 -07:00
Kimmo Vuorinen e7088fe82c sshtunnel: init script improvements
* Fix for OpenSSH pickiness about argument order to be able to use
  tap devices.
* Allow tun/tap devices to be used from index 0 as demonstrated in
  example config.
* Change arithmetic expressions.

Signed-off-by: Kimmo Vuorinen <kimmo.vuorinen@gmail.com>
2020-02-20 09:04:33 +01:00
Sven Eckelmann bbb1ea7345 treewide: Change .*GPL.*+ licenses to SPDX compatible identifier
The CONTRIBUTING.md requests an (or multiple) SPDX identifier for GPL
licenses. But a lot of packages did use a different, non-SPDX style with a
"+" at the end instead of "-or-later".

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-09-10 07:45:15 +02:00
Deng Qingfang 17496030e2 treewide: add missing PKGARCH:=all to non-binary packages
Packages such as Perl, Lua, shell scripts don't generate binary files.
Add PKGARCH:=all to them.

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
2019-03-30 17:11:50 +08:00
Jeffery To f5181d615c sshtunnel: Update init script
This replaces the use of uci_validate_section() with
uci_load_validate(), which removes the need to declare local variables
for every config option.

This also fixes some validation, makes variable declarations local,
removes unnecessary curly brackets.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-02-04 09:17:14 +01:00
Kiril Zyapkov 9d3877d446 sshtunnel: switch to procd
This changeset removes the shell wrapper the package used previously,
and uses the instance-management abilities of procd to track ssh
processes. Many fixes and improvements were integrated from the
package maintainer's branch at

https://github.com/nunojpg/packages/tree/sshtunnel

Signed-off-by: Kiril Zyapkov <kiril.zyapkov@gmail.com>
2015-12-14 09:35:03 +02:00
Nuno Goncalves 76f57ca7eb sshtunnel: fixes validation bug with dynamic port forwarding.
Thanks to Avi Alkalay <avi@unix.sh>

Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
2015-05-25 22:07:04 +01:00
Nuno Goncalves 73392f3ff3 sshtunnel: move to github
Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
2014-09-16 01:37:29 +01:00