in reply to Cygwin/UNIX ssh connector with profiles

Shouldn't you have been able to use ssh_config (or more likely ~/.ssh/config)? AFAIK the ssh that comes with cygwin is OpenSSH as is the ssh in most other places, so you should be able to use the config file.
Host myhost
  User differentuser
  Compression Yes
  Protocol 2
  Other_Options with_settings
It doesn't allow you to specify a RemoteCommand to run, but that seems like an odd feature. It is a kewl hack anyway, but there might be different ways to go about it.
--
andrew
  • Comment on Re: Cygwin/UNIX ssh connector with profiles

Replies are listed 'Best First'.
Re^2: Cygwin/UNIX ssh connector with profiles
by radiantmatrix (Parson) on Sep 06, 2007 at 22:24 UTC

    Yes, I should probably reference that; my organization uses a commercial ssh client that doesn't have such config options, which was reason #1.

    Secondly, though -- there are a number of cases at my organization where the "standard hostname" is simply unmemorable (because each char has some "meaning" that no one can recall without a 3"-thick binder); the ability to have a "profile" name that specifies a different hostname is occasionally extremely useful, especially when on a machine where I can't alter /etc/hosts. (And they don't allow aliases in DNS except under very special circumstances. Bastards.)

    For example, I can 'sshc syslog13' and connect as 'radiant' to 'xsv3ncmnw19n20h3-13' (yes, that's a real hostname). It's equally useful when I have to use our long-ass FQDN's, like when I need to log in at the DMZ.

    <radiant.matrix>
    Ramblings and references
    The Code that can be seen is not the true Code
    I haven't found a problem yet that can't be solved by a well-placed trebuchet
      Not using OpenSSH, yes, that could make the script much more useful. You can use the config file for aliases though.
       HostName
               Specifies the real host name to log into.  This can be used to
               specify nicknames or abbreviations for hosts.  The default is the
               name given on the command line.  Numeric IP addresses are also
               permitted (both on the command line and in HostName specifica-
               tions).
      
      So you could use something like:
      Host syslog13
          HostName xsv3ncmnw19n20h3-13
          User radiant
      
      Again, all useless with another ssh implementation. Oh well! l8rZ,
      --
      andrew