23.10.2015 0:50, Jan Alexander Steffens пишет: > On Thu, Oct 22, 2015 at 11:07 PM, Mikhail Kasimov > <mikhail.kasi...@gmail.com> wrote: >> Hello! >> >> 1. systemd services have a special key (-H) to connect to remote host >> via ssh. E.g. 'timedatectl -H user@host'. By default port 22 is used. >> But in very often cases admins change the default ssh-port in >> sshd-daemon settings (e.g. 41122). It's useful to avoid connections from >> ssh-bruteforce robots. >> But systemd has no way (I can't find it in man-pages for example) how to >> define the admin-defined ssh connection port (possibly, other ssh >> options are also not accessable). > > You can use ~/.ssh/config to alter any connection properties > associated with a certain hostname, even directing the connection to a > completely different host (a way of creating aliases). > > Example: > > Host foo > HostName foo.example.com > User bar > Port 41122 > > and henceforth, `timedatectl -H foo` will connect to > b...@foo.example.com:41122
Hmm... it's simple variant I didn't think about, thanks. But I have builded more complicated conception. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel