LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   ssh without passwd (https://www.linuxquestions.org/questions/debian-26/ssh-without-passwd-650317/)

abd_bela 06-19-2008 08:26 AM

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

nx5000 06-19-2008 09:13 AM

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

jschiwal 06-19-2008 10:35 AM

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.

abd_bela 06-23-2008 12:46 PM

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

nx5000 06-23-2008 02:55 PM

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.


All times are GMT -5. The time now is 01:40 PM.