* Re: ssh auto-login-script
@ 2004-09-07 23:28 DerPuh
0 siblings, 0 replies; 4+ messages in thread
From: DerPuh @ 2004-09-07 23:28 UTC (permalink / raw)
To: linux-admin
thx everyone!
i decided to use the ssh-keygen-method!
works fine! :)
^ permalink raw reply [flat|nested] 4+ messages in thread
* ssh auto-login-script
@ 2004-09-06 18:11 DerPuh
2004-09-06 18:29 ` Matt Hemingway
2004-09-07 18:33 ` Stephen Samuel
0 siblings, 2 replies; 4+ messages in thread
From: DerPuh @ 2004-09-06 18:11 UTC (permalink / raw)
To: linux-admin
Hi everybody!
I have to find a possibility to send a password directly to the ssh
password-prompt with a shell-script...
i tried to send it by pipe but it is blocked by the client...
does anyone have an idea if it is possible and if it is, how it works?
thx, DerPuh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ssh auto-login-script
2004-09-06 18:11 DerPuh
@ 2004-09-06 18:29 ` Matt Hemingway
2004-09-07 18:33 ` Stephen Samuel
1 sibling, 0 replies; 4+ messages in thread
From: Matt Hemingway @ 2004-09-06 18:29 UTC (permalink / raw)
To: DerPuh, linux-admin
Well, it can be done via an expect script. I wouldn't
recommend that though as the password will be contained in
a file.
Instead, take a look at using ssh keys to do the login. A
google search on "ssh keys" pulls up some good docs.
-Matt
On Wed, 08 Sep 2004 20:08:26 +0200
DerPuh <Puhbaer01@gmx.de> wrote:
>Hi everybody!
>
>I have to find a possibility to send a password directly
>to the ssh password-prompt with a shell-script...
>
>i tried to send it by pipe but it is blocked by the
>client...
>
>does anyone have an idea if it is possible and if it is,
>how it works?
>
>thx, DerPuh
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe
>linux-admin" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at
> http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ssh auto-login-script
2004-09-06 18:11 DerPuh
2004-09-06 18:29 ` Matt Hemingway
@ 2004-09-07 18:33 ` Stephen Samuel
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Samuel @ 2004-09-07 18:33 UTC (permalink / raw)
To: DerPuh, linux-admin
You're probably far better off to use ssh-keygen and public key
authentication...
The quickie method:
ssh-keygen -f qlogin -t rsa
When it asks for a password, just hit enter twice.
This creates a passwordless private key file.
There will be two files: qlogin and qlogin.pub
qlogin.pub is the public key. copy it to the destination
box, and add it to the appropriate user's .ssh/authorized_keys2
file. It doesn't need MUCH protection, unless you have enemies
in the NSA. Nontheless, it is prudent to make it readable only
by the owner.
At this point, you can simply go:
ssh -i qlogin user@remotebox
In this case the contents of the qlogin file is (effectively)
your pasword, and should only be readable by yourself (mode 400)
On the destination end, you can also modify the key to limit what
you can do with it -- most notably, you can limit it so that you
can only run a specific command:
if the original key looks like:
ssh-rsa AAAAB3NzaC1yc......HzoU= samuel@source.com
(I deleted most of the key and replaced with .....)
then prepend the following:
command="/home/me/bin/dothis" ssh-rsa AAAAB3NzaC1yc......HzoU= samuel@source.com
At that point, anybody who gets hold of the key will ONLY beable to run
the /home/me/bin/dothis program (no matter what they put on the ssh
comand line). You might also want to turn things like port forwarding
off.
DerPuh wrote:
> Hi everybody!
>
> I have to find a possibility to send a password directly to the ssh
> password-prompt with a shell-script...
>
> i tried to send it by pipe but it is blocked by the client...
>
> does anyone have an idea if it is possible and if it is, how it works?
>
> thx, DerPuh
--
Stephen Samuel +1(604)876-0426 samuel@bcgreen.com
http://www.bcgreen.com/~samuel/
Powerful committed communication. Transformation touching
the jewel within each person and bringing it to light.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-09-07 23:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-07 23:28 ssh auto-login-script DerPuh
-- strict thread matches above, loose matches on Subject: below --
2004-09-06 18:11 DerPuh
2004-09-06 18:29 ` Matt Hemingway
2004-09-07 18:33 ` Stephen Samuel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).