Last one and I am out of ideas.
cat /root/.ssh/config
Last one and I am out of ideas.
cat /root/.ssh/config
There is no such file at that location.
Can you try on your OMV server
nc -nvz <web server ip> 22445 (if you would like to use the host name use nc -vz <hostname> 22445
?
nc is used to check if there is a listener on the remote site (like e.g. a ssh deamon)
Not sure if nc is installed by default, if not use apt to install it.
So the port is open/there is a listener
Assume ssh -p 22445 user@server will also work... .
First rely is blocke. Assume because of <at>
So the port is open/there is a listener
Assume ssh -p 22445 user<at>erver will also work... .
Yes,.
I can connect to the remote web-server on any port using terminal but not via OMV's gui and rsync on different port than 22.
With ssh? You try to use rsync over ssh which means the ssh connection needs to be established first.
Can you post the sshd_conf from the web server?
Is there a line Port 22445 to establish a listener on the port? (multiple entries are allowed but didn't test is by myself)
check my previous posts, it's already there, here's the link
Rsync - Connection refused on different port than 22
No, not this one.
The /etc/ssh/ssd_config on the web server (the destination) must conatin something like:
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
Port 22445
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
Alles anzeigen
Just added the line 6 (Port 22455) on my own server for a test and could connect with ssh -p 22445 <my user><at><my server>.
Here it is,
# What ports, IPs and protocols we listen for
Port 22445
# Use these options to restrict which interfaces/protocols sshd will bind to
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 2048
# Logging
SyslogFacility AUTH
LogLevel INFO
# Authentication:
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
PasswordAuthentication no
X11Forwarding no
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
ClientAliveInterval 180
ClientAliveCountMax 0
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
AllowUsers XXXXX
Alles anzeigen
Compared with my one.
I don't have the AllowUsers line. Following the man page you restrict the access with this to user XXXXX
Is this your intention?
I've compared.
You're saying that i should open second port for ssh connections?
That last line has no matter. Exists for better security. I can delete that, under XXXX is my user name.
Don't think you need a second port. But for a try to figure out where is the problem it might help. Same for the user.
Until you have a stable connection I would remove the limits and then activate them one by one again. And test with ssh -p 22445 -vvv user<at>server to see where the ssh hangs.
I can copy, synchronize files via terminal and rsync command without any problems:
I can not do that via OMV's interface and rsync task. Apparently there's a bug with SSH Port setting, at least in this particular case.
I found simple workaround. I've opened rsync task for edit and in Extra options field added:
-e "ssh -p 22445"
That line resolved my problem.
Anyway thanks subzero79 and chris789.
Respect !
Strange if you don't mind you can delete that extra option save. Post the content of the script from
/var/lib/openmediavault/cron.d/rsync-uuid
You have several task so you'll have to check which one was it.
I don't mind:
!/bin/sh
# This configuration file is auto-generated.
# WARNING: Do not edit this file, your changes will be lost.
. /usr/share/openmediavault/scripts/helper-functions
cleanup() {
omv_kill_children $$
rm -f /var/run/rsync-1c254254-5487-5aa2-273f-e8547a547877
exit
}
[ -e /var/run/rsync-1c254254-5487-5aa2-273f-e8547a547877 ] && exit 1
if ! omv_is_mounted "/srv/dev-disk-by-label-bpi-bck" ; then
echo "Destination storage device not mounted at </srv/dev-disk-by-label-bpi-bck>!"
exit 1
fi
trap cleanup 0 1 2 5 15
touch /var/run/rsync-1c254254-5487-5aa2-273f-e8547a547877
echo "Please wait, syncing <me@10.0.0.3:/home> to </srv/dev-disk-by-label-bpi-bck/backups/webserver> ...\n"
eval $(ssh-agent) >/dev/null
ssh-add /etc/ssh/openmediavault-ca5471b0-a241-4ccb-a7c4-532v45gfd87s >/dev/null
rsync --verbose --log-file="/var/log/rsync.log" --rsh "ssh -p 22445" --recursive --times --compress --archive --perms --partial 'me@10.0.0.3:/home' '/srv/dev-disk-by-label-bpi-bck/backups/webserver' & wait $!
Alles anzeigen
Something I've seen in the script: Between --rsh and "ssh -p ..." is a missing '='. If you add the -e before the "ssh -p ..." you get the same as with ---rsh=ssh -p ... . Think the missing '=' is the problem.
Cannot test how to get the correct syntax in the script because my OMV is 2.x and I use rsync as part of a bigger (self scripted) backup solution and not the plugin.
Something I've seen in the script: Between --rsh and "ssh -p ..." is a missing '='. If you add the -e before the "ssh -p ..." you get the same as with ---rsh=ssh -p ... . Think the missing '=' is the problem.
The manual indicates as you point, but i have a similar pull setup using a remote public server also using a different port and it works as expected using --rsh "ssh -p 2000" . I have no idea why is defaulting to port 22 in this case
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!