[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Using ssh and scp
Dr. Gilfoyle,
>From the command line, I understand that you ran ssh-add on pcsm1.
You have to ran that command from your client machine (presumable remote)
from where you want to login into pscm1. That is to be the machine where you
generated your ssh keys.
In the setup steps that I sent to you, step 4 is to be done on the remote
machine (i.e. your home machine).
Maybe my description was a little fuzzy. In step 4, "after you logged in"
means on the "client" machine from where you will initiate ssh session to
the pscm1.
Sasko
-----Original Message-----
From: gilfoyle [mailto:ggilfoyl@richmond.edu]
Sent: Monday, September 30, 2002 9:06 PM
To: Stefanovski, Sasko
Subject: Re: Using ssh and scp
hi sasko,
i tried out the directions below and got through most of it
successfully
until i did ssh-add. then i got the following.
pscm1:gilfoyle> ssh-add
/home/gilfoyle/.ssh/identity: No such file or directory
pscm1:gilfoyle>
any ideas on how i messed up?
jerry
"Stefanovski, Sasko" wrote:
>
> Dr. Gilfoyle,
>
> As I have promised, here is how you can use ssh and scp without the need
to
> retype your password often.
>
> On your client machine:
> 1. Generate ssh-key with
> ssh-keygen -t dsa -b 1024 -f ~/.ssh/id_dsa
> This will generate 2 files in your ~/.ssh directory:
> - id_dsa
> - id_dsa.pub
> I've decided to create key-pair just for ssh v2 protocol.
> There is no need for this step if you already have your keys generated.
> See in ~/.ssh directory.
>
> 2. Copy the id_dsa.pub file in the ~/.ssh directory on the pscm1 machine
and
> append it to the authorized_keys2 file
> cd ~/.ssh
> scp id_dsa.pub gilfoyle@pscm1.richmond.edu:.ssh
> ssh pscm1.richmond.edu
> <type your password>
> cd .ssh
> cat id_dsa.pub >> authorized_keys2
>
> 3. Try to login from your client machine using ssh
> ssh pscm1.richmond.edu
> You will get something like:
> Enter passphrase for key '<path_to_your_home>/.ssh/id_dsa' :
> Here enter the password you chose while generating the ssh-keys.
> Successful login says the setup is o.k.
>
> 4. Now, in order not to have your password entered on every ssh connection
> or for every scp file transfer,
> do the following on your client machine once you have logged in (on
the
> client machine).
>
> Execute (in xterm, or whatever terminal window you are using):
> ssh-agent /bin/ksh
> Note: Replace /bin/ksh with whatever you are using for your login
shell.
> Then, authenticate yourself to the agent with:
> ssh-add
> Enter here your password you were using for generating the ssh-keys
> From now on, you can login with ssh or do an scp to your cluster
account
> without providing password. Please be notified that you can do that only
> from the terminal window ssh-agent was executed in, and from its child
> processes (You can open another xterm from that window, and you can
initiate
> ssh connections without password from that window too).
> If you want to delete your identity from the agent you can use
> ssh-add -d
> or if you decide to remove the agent do
> ssh-agent -k
> in the same xterm you have used to start it.
>
> Hope you'll have no problems using ssh/scp.
>
> Cheers,
> Sasko
--
Dr. Gerard P. Gilfoyle
Physics Department e-mail: ggilfoyl@richmond.edu
University of Richmond, VA 23173 phone: 804-289-8255
USA fax: 804-289-8482