Joachim Schipper wrote:
> On Wed, Oct 14, 2009 at 10:55:36PM +0400, Vadim Zhukov wrote:
>> On 14 October 2009 c. 22:46:07 Pieter Verberne wrote:
>>> (...) I configured ssh to listen on port 2222 (...). Now rdist is
>>> not working anymore:
>>>
>>> $ rdist -f [distfile]
>>> pie...@lilium: updating host lilium
>>> ssh: connect to host lilium port 22: Connection refused
>>> pie...@lilium: LOCAL ERROR: No input from server.
>>> pie...@lilium: updating of pie...@lilium finished
>>>
>>> rdist runs this command:
>>> ssh <host> -l <login_name> rdistd -S
>>>
>>> is there a way to change it in:
>>> ssh <host> -p 2222 -l <login_name> rdistd -S
>> You can play with your ~/.ssh/config file, see ssh_config(5).
> 
> If that doesn't work,

If it does not, something is broken.

>                       use -P and a trivial wrapper script like
> 
> #!/bin/sh
> 
> exec /usr/bin/ssh -p 2222 "$@" 

This is how I did stuff before I realized the magic .ssh/config could
do. There is no comparison how bloody easy things got after that.
Accessing multiple sshd's on the same ip but on different ports by
giving them separate hostnames just works with no fuzz at all.

And its so simple too. Love love love.

One thing on my todo (when that day comes where I get time to dig into
it), is to make ssh-keyscan also use the configuration. It's annoying
that it currently does not.

> But ~/.ssh/config is much neater, since it solves the issue for all
> programs at once.

Amen

Reply via email to