Re: workarounds for Host param not canonicalizing?

From: Alexander Klimov (alserkli_at_inbox.ru)
Date: 05/23/05

  • Next message: Hicks,Rodger: "Public key authentication problem"
    Date: Mon, 23 May 2005 09:57:17 +0300 (IDT)
    To: Ryan Barrett <secureshell@ryanb.org>
    
    

    On Sun, 22 May 2005, Ryan Barrett wrote:

    > On Sun, 22 May 2005, Alexander Klimov wrote:
    >
    > > so you CAN use `Host *.foo.com'
    >
    > that only works if you type the fully qualified name on the command line.
    > from your man page quote:
    >
    > > The host is the hostname argument given on the command line (that is,
    > > the name is not converted to a canonicalized host name before matching).
    >
    > if you ssh between machines often, and your domain name is long, e.g.
    > *.research.foobar.com, you won't want to type it out every time. you can,
    > but usability-wise, it's not much of a win.

    If you want to save typing you can use in ssh_config, say,

     Host www
     HostName a-realy-long-name-of-the-www-server-or-its-IP

    and when

     ssh www

    man ssh_config:

         HostName
               Specifies the real host name to log into. This can be
               used to specify nicknames or abbreviations for hosts.
               Default is the name given on the command line. Numeric
               IP addresses are also permitted (both on the command
               line and in HostName specifications).

    And, of course, you can generate your ssh_config if you have a lot of
    such pairs, e.g.,

    perl -e 'print "Host $_\nHostName $_.my.domain\n" for qw(www ftp smtp)'

    -- 
    Regards,
    ASK
    

  • Next message: Hicks,Rodger: "Public key authentication problem"

    Relevant Pages

    • Re: Really need help on this one
      ... Is there a way to read the output of a particular command into ... Heres a better example using ssh. ... set timeout $timeout ... exec kill -9 $pid ...
      (comp.lang.tcl)
    • Re: OT: Hard disk mirror with Paragon on USB stick?
      ... at least two pages of intricate command line stuff. ... The password is only used when you want to backup to a remote machine ... via the network, using the ssh protocol. ... (e.g. with linux, ...
      (sci.electronics.design)
    • RE: midnight commander and ssh sftp
      ... midnight commander and ssh sftp ... which is displayed at the bottom of the MC panel. ... "Left file command options right" at the top of the MC ... MC SSH session with the remote host by hitting F10 key. ...
      (freebsd-questions)
    • Re: sshd and ftpd
      ... ssh keys, so when you log in it doesn't ask for one. ... we want to be able to connect to our remote host without ... If you used the defaults supplied by the ssh-keygen command, ...
      (Ubuntu)
    • Re: ssh
      ... With 'fully' I mean that command: ... ssh target_machine_name date ... ~/.ssh/authorized_keys on my home computer. ... He also mentioned scp, and I think the better alternative would be to run sftp with a batch file. ...
      (Debian-User)