You are not logged in.

#1 2011-04-08 14:48:49

cenobyte
Member
Registered: 2011-03-21
Posts: 10

[SOLVED] Trouble with SSH Key

I have a ssh server setup everything works great but i don`t want to enter the password every time so i tried to follow the ssh page on the

wiki https://wiki.archlinux.org/index.php/Using_SSH_Keys

i followed everything precisely but when i have to

ssh-add ~/.ssh/id_ecdsa

i get this error

/home/user/.ssh/id_ecdsa: No such file or directory

for some reason the file or directory does not exist i cant figure this out at all i have been trying to figure out why id_ecdsa is not in ~/.ssh it may be something trivial but i just cant figure it out please help also /home/user is my home directory

Last edited by cenobyte (2011-04-12 00:11:35)


Dell Mini 10v - Intel Atom N270 1.6ghz Dual Core - 1GB Ram - 16GB SSD - Arch Linux /w Openbox

Offline

#2 2011-04-08 17:31:55

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: [SOLVED] Trouble with SSH Key

That is a specific command for a particular type of key. If you did not use that sort of key (ecdsa), you will have to use a different file. Try looking in the .ssh folder to see what id_<type> files you have to choose from.

Offline

#3 2011-04-09 01:21:43

cenobyte
Member
Registered: 2011-03-21
Posts: 10

Re: [SOLVED] Trouble with SSH Key

i dont have any id_ type files to choose from just authorized_keys file on the ssh server but i have them on the machine i am  connecting from

Last edited by cenobyte (2011-04-09 02:00:01)


Dell Mini 10v - Intel Atom N270 1.6ghz Dual Core - 1GB Ram - 16GB SSD - Arch Linux /w Openbox

Offline

#4 2011-04-09 01:57:43

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: [SOLVED] Trouble with SSH Key

cenobyte wrote:

i dont have any id_ type files to choose from just authorized_keys file

Did you run ssh-keygen to generate the keys?
It asks where to put the generated keys, with the default location ~/.ssh

Last edited by my0pic (2011-04-09 02:02:22)

Offline

#5 2011-04-09 02:10:16

cenobyte
Member
Registered: 2011-03-21
Posts: 10

Re: [SOLVED] Trouble with SSH Key

i tried running ssh-keygen on both machines still no luck but now i do have the id files on the server and when i try

ssh-add ~/.ssh/id_ecdsa

it works but when i  connect it is still asking for the passphrase


Dell Mini 10v - Intel Atom N270 1.6ghz Dual Core - 1GB Ram - 16GB SSD - Arch Linux /w Openbox

Offline

#6 2011-04-09 02:58:19

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,768

Re: [SOLVED] Trouble with SSH Key

If you created a passphrase, this is the normal operation. 

See this article for ways to manage keys


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2011-04-09 10:11:46

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: [SOLVED] Trouble with SSH Key

ewaller: You may have noticed he linked to that very article in his original post wink

cenobyte: I think there is a bit of a misunderstanding here. You don't run ssh-add et. al. on the server  side, you do that from the client. The server does not need any id_<type> files unless you plan to use it as a client as well.

Offline

#8 2011-04-10 18:45:45

cenobyte
Member
Registered: 2011-03-21
Posts: 10

Re: [SOLVED] Trouble with SSH Key

I tried this all over again i made the key on the computer i am connecting from i copied the .pub file to the server followed the steps and still no id_file in the servers .ssh folder so i am still unable to login automatically i follow each step precisely and still no luck

"cenobyte: I think there is a bit of a misunderstanding here. You don't run ssh-add et. al. on the server  side, you do that from the client. The server does not need any id_<type> files unless you plan to use it as a client as well."

i know but i tried it anyway hoping it would work this is the only time i have been this stumped with linux since making the full switch back in 2005.

Granted this is not a huge issue but i would like to automatically login to my ssh server.

I will keep trying i also appreciate the help and suggestions from you jac and my0pic any other suggestions this has to be trivial i feel a facepalm will happen ounce i figure this out lol


Dell Mini 10v - Intel Atom N270 1.6ghz Dual Core - 1GB Ram - 16GB SSD - Arch Linux /w Openbox

Offline

#9 2011-04-10 19:14:17

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED] Trouble with SSH Key

yes, a facepalm is lurking there, i sense it as well
first i'd ls -al ~ on the server, just in case
elsewise my suggestion, copy the file using sshfs


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#10 2011-04-10 22:13:01

cenobyte
Member
Registered: 2011-03-21
Posts: 10

Re: [SOLVED] Trouble with SSH Key

fsckd wrote:

yes, a facepalm is lurking there, i sense it as well
first i'd ls -al ~ on the server, just in case
elsewise my suggestion, copy the file using sshfs

i did ls -al on the server both in ~/ and ~/.ssh still no luck i will try sshfs when i get home and will report back the results


Dell Mini 10v - Intel Atom N270 1.6ghz Dual Core - 1GB Ram - 16GB SSD - Arch Linux /w Openbox

Offline

#11 2011-04-11 22:01:31

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: [SOLVED] Trouble with SSH Key

You do not run ssh-add on the server, you run it on the client. There should be no id_<type> files on the server. That is not where you should be looking. It is only a problem if you have none on the client computer. What is the actual output of "ls ~/.ssh" on the client?

Offline

#12 2011-04-12 00:10:05

cenobyte
Member
Registered: 2011-03-21
Posts: 10

Re: [SOLVED] Trouble with SSH Key

jac wrote:

You do not run ssh-add on the server, you run it on the client. There should be no id_<type> files on the server. That is not where you should be looking. It is only a problem if you have none on the client computer. What is the actual output of "ls ~/.ssh" on the client?

FACEPALM (i did not think of that)

I ran ssh-add on the client now it is working they should clarify that in the documentation here :

that you run ssh-add on the client and not the server otherwise this is the best documentation i have seen yet on SSH

https://wiki.archlinux.org/index.php/Using_SSH_Keys


thank you all so much for the help i really appreciate it smile


Dell Mini 10v - Intel Atom N270 1.6ghz Dual Core - 1GB Ram - 16GB SSD - Arch Linux /w Openbox

Offline

#13 2011-04-12 00:39:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Trouble with SSH Key

cenobyte wrote:

they should clarify that in the documentation here :

that you run ssh-add on the client and not the server otherwise this is the best documentation i have seen yet on SSH

https://wiki.archlinux.org/index.php/Using_SSH_Keys

s/they/you/ - it is a wiki for a reason smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB