Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Enter info after seeing certain prompt

Expand Messages
  • Jeff Eggen
    ... Are you using openssh? 1. Generate private / public keypair on source host with ssh-keygen command. 2. Copy public key to target server, put in a file
    Message 1 of 9 , Oct 1, 2004
    • 0 Attachment
      >Got a good website to help me with password solution? I am thinking
      >of a temporarily solution till someone figures out how do the "Expect"
      > like scripting with PERL. Perl is what I want to master. =)

      Are you using openssh?

      1. Generate private / public keypair on source host with ssh-keygen command.
      2. Copy public key to target server, put in a file called authorized_keys in the $HOME/.ssh/ directory.
      3. On source server, run "ssh targetserver date" to test it, where targetserver is the target server.

      This should get you set up to not require a password: if it doesn't work, then your ssh server config needs tweaking. This would be odd, as most of the time the default config will allow for this behavior. Note that for this setup, you still need whatever passphrase is on the private key. If you create the key without a passphrase, then you can get in without any interaction at all.

      As for the Perl / Expect thing, you could always download the Expect module from the CPAN and look at how it does whatever it does. However, if you want to master Perl, then one of the first steps is realizing that if someone has made a module to do something difficult, use theirs. Reinventing the wheel is typically more trouble than it's worth. For learning purposes, I got more value out of the O'Reilly books (especially Randal's books, and the Cookbooks) and writing small programs using them as references than anything else.

      Hope this helps somewhat,

      Jeff Eggen
      IT Programmer Analyst
      Saskatchewan Government Insurance
      Ph (306) 751-1795
      email jeggen@...

      ************DISCLAIMER*************
      This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the named addressee, please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that using, disclosing, copying or distributing the contents of this information is strictly prohibited.
      ************DISCLAIMER*************
    Your message has been successfully submitted and would be delivered to recipients shortly.