Help!

ssh query string and password

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Security RSS
Next:  HPN SSH patches on Fedora and/or RHEL  
Author Message
niraj
External


Since: Feb 20, 2007
Posts: 4



PostPosted: Wed Feb 21, 2007 10:03 pm    Post subject: ssh query string and password
Archived from groups: comp>os>linux>security (more info?)

Hi ,

I want to login with ssh without asking for password prompt . Like
when i login into some machine with ssh username@hostname i want to
add password in the query string itself (basically i dont want
password prompt) . Is there any way to do this.


Thanks,
Niraj Kumar
Back to top
niraj
External


Since: Feb 20, 2007
Posts: 4



PostPosted: Thu Feb 22, 2007 1:35 am    Post subject: Re: ssh query string and password [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

So it means that we can not write a script which will log me via ssh
command . My requirement is that every thing has to be in the script
and there should be no user interaction.

Niraj




On Feb 22, 1:16 pm, Ertugrul Soeylemez <use... DeleteThis @streitmacht.eu> wrote:
> "niraj" <niraj.kumar.... DeleteThis @gmail.com> (07-02-21 22:03:49):
>
> > I want to login with ssh without asking for password prompt . Like
> > when i login into some machine with ssh username@hostname i want to
> > add password in the query string itself (basically i dont want
> > password prompt) . Is there any way to do this.
>
> Intentionally no. This is a security hazard. If you really want to do
> such a stupid thing, then use ssh-agent or use key-based authentication
> with a passphraseless key (which is a lot more secure at least, than
> password authentication in this case).
>
> Regards,
> E.S.
Back to top
Velocity
External


Since: Dec 17, 2005
Posts: 8



PostPosted: Thu Feb 22, 2007 1:36 am    Post subject: Re: ssh query string and password [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On the originating machine, say

ssh-keygen -t rsa

Save the key in the default file (~/.ssh/id_rsa) and do not use a
passphrase. This will create a file ~/.ssh/id_rsa.pub. Add the
contents of this file to the file ~/.ssh/authorized_keys2 on the
remote machine (i.e., the machine on which you want to log on).
Whereas the id_rsa.pub file is world readable, the authorized_keys2
file should only be readable by you. Use chmod to set the permissions
accordingly.
Back to top
Ertugrul Soeylemez
External


Since: Feb 12, 2007
Posts: 9



PostPosted: Thu Feb 22, 2007 9:16 am    Post subject: Re: ssh query string and password [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"niraj" <niraj.kumar.ait.RemoveThis@gmail.com> (07-02-21 22:03:49):

> I want to login with ssh without asking for password prompt . Like
> when i login into some machine with ssh username@hostname i want to
> add password in the query string itself (basically i dont want
> password prompt) . Is there any way to do this.

Intentionally no. This is a security hazard. If you really want to do
such a stupid thing, then use ssh-agent or use key-based authentication
with a passphraseless key (which is a lot more secure at least, than
password authentication in this case).


Regards,
E.S.
Back to top
untitled
External


Since: Feb 22, 2007
Posts: 3



PostPosted: Thu Feb 22, 2007 4:51 pm    Post subject: Re: ssh query string and password [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

niraj schreef:
> Hi ,
>
> I want to login with ssh without asking for password prompt . Like
> when i login into some machine with ssh username@hostname i want to
> add password in the query string itself (basically i dont want
> password prompt) . Is there any way to do this.
>
>
> Thanks,
> Niraj Kumar
>
Creating ssh key with no password would do that.
ssh-keygen -t rsa and if it ask you for password leave it blank.
Back to top
Ertugrul Soeylemez
External


Since: Feb 12, 2007
Posts: 9



PostPosted: Thu Feb 22, 2007 7:04 pm    Post subject: Re: ssh query string and password [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"niraj" <niraj.kumar.ait RemoveThis @gmail.com> (07-02-22 01:35:31):

> > > I want to login with ssh without asking for password prompt . Like
> > > when i login into some machine with ssh username@hostname i want
> > > to add password in the query string itself (basically i dont want
> > > password prompt) . Is there any way to do this.
> >
> > Intentionally no. This is a security hazard. If you really want to
> > do such a stupid thing, then use ssh-agent or use key-based
> > authentication with a passphraseless key (which is a lot more secure
> > at least, than password authentication in this case).
>
> So it means that we can not write a script which will log me via ssh
> command . My requirement is that every thing has to be in the script
> and there should be no user interaction.

You don't pay attention. Use public key based authentication with a
passphraseless private key. This way there is no user interaction.

The other possibility is to use the ssh-agent, which will require you to
log in at least once manually, so it can cache the password for you.
This is probably even more secure, because at least the password won't
be saved on the hard-disk in this case, whereas the private key is a
file.


Regards,
E.S.
Back to top
Ertugrul Soeylemez
External


Since: Feb 12, 2007
Posts: 9



PostPosted: Thu Feb 22, 2007 7:05 pm    Post subject: Re: ssh query string and password [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Velocity" <mishra.tapasvi.RemoveThis@gmail.com> (07-02-22 01:36:19):

> Whereas the id_rsa.pub file is world readable, the authorized_keys2
> file should only be readable by you.

Why?


Regards,
E.S.
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Security All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum