LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-19-2008, 08:26 AM   #1
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 627

Rep: Reputation: 31
ssh without passwd


Hi every one,

I am using DSL (small knoppix ) on small miniPC.

I tried the ssh-keygen it seemed running correctly, it generates the key (pub and priv),
but the ssh-add gave cannot open a connection to
authentifcation agent ???? , I tried it after ssh-agent I got same error.


In fact I want an automatic ( from scrpit without passwd ) connection to myserver using ssh. I don't know if ssh has an option to disable the passwd or to send it thru the command ???

thanks a lot
best regards
bela
 
Old 06-19-2008, 09:13 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
You need to run ssh-agent, but also have to execute the output of ssh-agent (the line export has to be executed so that ssh-add how to contact the ssh-agent)

Code:
eval `ssh-agent`
And then try to connect to the agent:
Code:
ssh-add

Last edited by nx5000; 06-19-2008 at 09:14 AM.
 
Old 06-19-2008, 10:35 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
ssh-agent is used to hold the passphrase of your private key. It also is valid for that instance of the shell and not from another terminal. From your question, I gather it might be possible that the ssh server uses password authentication rather than public key authentication. The sshd_config, sshd man pages and the comments in the sshd_config file contain instructions on setting up public key authentication. Also, search this site for "public key authorized_keys" for a large number of posts on this subject.

If you have a public key authentication, but your private key doesn't have a passphrase, then it is already possible to start an ssh session without a passphrase. You won't need ssh-agent or ssh-add in this case.
 
Old 06-23-2008, 12:46 PM   #4
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 627

Original Poster
Rep: Reputation: 31
Thanks to all,
I fixed my problem, the ssh-agent doesn't work correcly,
The variables SSH_AGENT_PID SSH_AUTH_SOCK are not exported correcly, so I did it manually and Ok it worked!!!!


by the way, since DSL uses fluxbox, there is no action to disable the "powersave" as in more complete window manager, I wnat to keep the display always awake. So I want to write a script or prog (shell or C) , to simulate a keyboard hit or mouse movement periodically to awake the display if it is off. I don't know how to "replace" a hit key (or move mouse) by a prog.

thanks again
bela
 
Old 06-23-2008, 02:55 PM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
that's the normal behaviour. You have to add the line i posted in your session script so that all subshells inherit from the export.
Before startx maybe.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh for not asking passwd linuxguy08 Linux - Server 13 09-03-2008 11:58 PM
ssh and passwd asked fjaspart Linux - Networking 3 06-22-2007 02:16 AM
SSH from master node to compute nodes w/out passwd haiders Linux - Networking 2 09-20-2006 11:50 AM
can i change my passwd and login to ssh? pippet Linux - Newbie 1 10-27-2004 01:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration