Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jun 2002 17:03:55 -0700 (PDT)
From:      twig les <twigles@yahoo.com>
To:        Jack Xiao <jack_xiao99@hotmail.com>, freebsd-security@freebsd.org, Lowell Gilbert <lowell@world.std.com>, "Mark S." <mark@furball.net>, Derek Ragona <derek@computinginnovations.com>
Subject:   Re: ssh questions
Message-ID:  <20020612000355.11939.qmail@web10107.mail.yahoo.com>
In-Reply-To: <OE39kl4AU1O6YalkXh3000015ab@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Look into a language called "Expect".  And don't be
intimidated by the fact that it's a new language to
learn.  Most likely you can run a script in cron that
will basically say:

spawn ssh
send [ssh command]
expect [normal response]
send [sftp command]

Obviously it's a little more complex than that, but
the beauty of Expect is that it's only a *little* more
complex than that.

It's not the most secure thing to do though.  But you
can mitigate that risk through permissions and maybe
not giving the user a shell (not sure if that breaks
sftp...).

The book for this is called "Exploring Expect" but you
could get away with a quick online tutorial like the
one here:

http://www.raycosoft.com/rayco/support/expect_tutor.html

Hope that helps.
Keith



--- Jack Xiao <jack_xiao99@hotmail.com> wrote:
> Hi,
> 
> I got ssh work without typing the username and
> password. But need further
> step, use sftp without typing username and passowrd.
> I have thought if ssh
> works fine, there's no problem with sftp. But I was
> still asked for the
> password when using sftp. Any ideas will be
> appreciated.
> 
> In addition, is it less secure for the ssh if there
> is no passphrase?
> 
> Thanks.
> 
> Jack
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-security" in the body of
> the message


=====
-----------------------------------------------------------
Only failures don't include failing in their plans
-----------------------------------------------------------

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020612000355.11939.qmail>