All of lore.kernel.org
 help / color / mirror / Atom feed
From: Terje Malmedal <terje.malmedal@usit.uio.no>
To: Larry McVoy <lm@bitmover.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: pull vs push (was Re: [bk patch] Make cardbus compile in -pre4)
Date: Sun, 10 Feb 2002 14:45:29 +0100	[thread overview]
Message-ID: <E16ZuIK-0000VR-00@morgoth> (raw)
In-Reply-To: Larry McVoy's message of Sat, 9 Feb 2002 20:28:21 GMT
In-Reply-To: <fa.hme158v.ki228f@ifi.uio.no> <fa.h89cnvv.116ski0@ifi.uio.no>


[Larry McVoy]
> This is my problem.  You could help if you could tell me what exactly 
> are the magic wands to wave such that you can ssh in without typing
> a password.  I know about ssh-agent but that doesn't help for this, 
> I know that in certain cases ssh lets me in without anything.  I thought
> there was some routine where you ssh-ed one way and then the other way
> and it left enough state that it trusted you, does any ssh genuis out 
> there know what I'm talking about?  If I have this, I can set up the
> cron job, I'm sure this is obvious and I'm just overlooking something
> but I can't find it.

When I'm paranoid I do something like this: 

Source host: 
$ ssh-keygen -t dsa -b 2048 -f keyfile -P ""

on the target add a line to ~someuser/.ssh/authorized_keys2: 

from="allowed.hostname",command="/some/command" ssh-dss AA[and the rest of keyfile.pub]

/some/command looks like this: 
#!/bin/sh
if cd /target ; then
:
else
  echo FAILED1
  exit
fi
if cat > filename ; then
:
else
  echo FAILED4
  exit
fi
if [ \! -s filename ] ; then
  echo FAILED2
  exit
fi
prev=".9"
for i in  .8 .7 .6 .5 .4 .3 .2 .1 ""; do
  mv filename$i filename$prev >/dev/null 2>&1
  prev=$i
done
if mv filename.transport filename ; then
  check=`sum -r filename | awk '{print $1}'`
  echo OK$check
  exit
fi
echo FAILED3

The command to send the file is typically: 
#!/bin/sh
check=`sum -r /file/to/send | awk '{print $1}'`
reply=`(cat /file/to/send ; sleep 5 ) | \
   ssh -l someuser -i keyfile target "echo hello there"`
if [ "x$reply" = "xOK$check" ] ; then
  echo Copy OK $check
else
  echo COPY NOT OK. Please do something. 
fi


-- 
 - Terje
malmedal@usit.uio.no

       reply	other threads:[~2002-02-10 13:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.hme158v.ki228f@ifi.uio.no>
     [not found] ` <fa.h89cnvv.116ski0@ifi.uio.no>
2002-02-10 13:45   ` Terje Malmedal [this message]
2002-02-11 18:51 pull vs push (was Re: [bk patch] Make cardbus compile in -pre4) Jesse Pollard
  -- strict thread matches above, loose matches on Subject: below --
2002-02-09  2:25 [bk patch] Make cardbus compile in -pre4 Patrick Mochel
2002-02-09  3:39 ` Andreas Dilger
2002-02-09  9:27   ` pull vs push (was Re: [bk patch] Make cardbus compile in -pre4) Rob Landley
2002-02-09 10:08     ` Andreas Dilger
2002-02-09 18:12       ` Stelian Pop
2002-02-09 20:59         ` Linus Torvalds
2002-02-09 20:12           ` Stelian Pop
2002-02-09 20:26             ` Larry McVoy
2002-02-09 20:51               ` Stelian Pop
2002-02-09 23:45                 ` Jeff Garzik
2002-02-09 23:49                 ` Larry McVoy
2002-02-09 20:57               ` Pau Aliagas
2002-02-09 21:07                 ` David Lang
2002-02-09 21:13                   ` Pau Aliagas
2002-02-09 21:45               ` Rob Landley
2002-02-10  0:19               ` Andreas Dilger
2002-02-10  0:36               ` Herbert Xu
2002-02-10  2:46               ` Alan Cox
2002-02-11 11:51     ` Pavel Machek
2002-02-11 18:42       ` John Alvord

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E16ZuIK-0000VR-00@morgoth \
    --to=terje.malmedal@usit.uio.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm@bitmover.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.