custom ssh port doveadm sync

Gedalya gedalya at gedalya.net
Tue Nov 18 09:26:49 UTC 2014


On 11/18/2014 04:09 AM, dvm at rdyn.net wrote:
>   
> Hi,
>
> Thanks. Like i said i read it all and somehow i have some trouble
> interpreting it and that is why i mentioned that i kinly asked for some
> help not re-quoting the manual as that didn't lead to a successful
> attempt so after reading everything and trying everything out i tried
> the mailing-list.
>
> the page is actually confusing and a kind user (thank you so much)
> emailed me and helped me out. (the man page is actually not correct in
> my opinion or i totally interpret it wrong :)
You did. The man page is not confusing. It's also not there to tell you 
how to use a custom SSH port. it does way better. It tells you how to 
use *any* custom ssh options. For more information about that, see man 
ssh. The -i is an ssh option to use a private key file, -p to specify a 
remote port. Like I said, see man ssh.

>
> This did work :
>
> # doveadm sync -u mailboxuser at mydomain.com ssh -p 15223
> SSHLOGINUSER at mydomain.com doveadm dsync-server -u
> mailboxuser at mydomain.com
>
> The main difference is the -p parameter (not present in sample and doc
> neither is the -i parameter so please next time don't quote blindly)
They are present. See man ssh.

> If you need more complex parameters to ssh, you can use e.g.:
That's not blind. Notice the "parameters to ssh" and the "e.g." parts.

> and
> that it is the SSHLOGINuser that's important which in the sample is
> called mail-user (not the same in my opinion).
> Again i might have read it all wrong but else a small update to the wiki
> could be useful ?
> thanks mailing-list and the user that helped me out.
>
>
Admittedly, I didn't help you, and someone else did. That's apparent. I 
nevertheless took the trouble to attempt to clarify what I did do.

Let's do even more:

doveadm sync -u mailboxuser at mydomain.com ssh -p 15223 
SSHLOGINUSER at mydomain.com doveadm dsync-server -u mailboxuser at mydomain.com

part 1: doveadm sync -u mailboxuser at mydomain.com
explanation: invoke dsync locally as mailboxuser at mydomain.com
rest of the line (part 2 and 3): what command dsync should run in order 
to reach the other side
part 2: ssh -p 15223 SSHLOGINUSER at mydomain.com
a very ordinary invokation of ssh, with the -p parameter
part 3, to be read as the rest of the *ssh command*, which is, what 
command to run on the remote server.

SSH(1)                                       BSD General Commands 
Manual                                       SSH(1)

NAME
      ssh — OpenSSH SSH client (remote login program)

SYNOPSIS
      ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] 
[-D [bind_address:]port] [-E log_file]
          [-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] [-Q cipher | cipher-auth | mac | kex | key]
          [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W 
host:port] [-w local_tun[:remote_tun]]
          [user@]hostname [command]

note the final "[command]" bit.




More information about the dovecot mailing list