Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #258150 > unrolled thread

ssh-keygen as a regular user

Started byIgor Korot <ikorot01@gmail.com>
First post2023-05-12 07:10 +0200
Last post2023-05-12 07:20 +0200
Articles 9 — 7 participants

Back to article view | Back to linux.debian.user


Contents

  ssh-keygen as a regular user Igor Korot <ikorot01@gmail.com> - 2023-05-12 07:10 +0200
    Re: ssh-keygen as a regular user Geert Stappers <stappers@stappers.nl> - 2023-05-12 07:20 +0200
      Re: ssh-keygen as a regular user Igor Korot <ikorot01@gmail.com> - 2023-05-12 07:50 +0200
        Re: ssh-keygen as a regular user Jeremy Ardley <jeremy@ardley.org> - 2023-05-12 08:00 +0200
          Re: ssh-keygen as a regular user jeremy ardley <jeremy@ardley.org> - 2023-05-12 12:30 +0200
            Re: ssh-keygen as a regular user Vincent Lefevre <vincent@vinc17.net> - 2023-05-12 14:40 +0200
              Re: ssh-keygen as a regular user Eduardo M KALINOWSKI <eduardo@kalinowski.com.br> - 2023-05-12 14:50 +0200
        Re: ssh-keygen as a regular user Hanno 'Rince' Wagner <wagner@rince.de> - 2023-05-12 08:10 +0200
    Re: ssh-keygen as a regular user Jeremy Ardley <jeremy@ardley.org> - 2023-05-12 07:20 +0200

#258150 — ssh-keygen as a regular user

FromIgor Korot <ikorot01@gmail.com>
Date2023-05-12 07:10 +0200
Subjectssh-keygen as a regular user
Message-ID<Gutct-8i8c-7@gated-at.bofh.it>
Hi, ALL,
Is there a reason I can't run "ssh-keygen" as a regular user?

I am able to do it as "root" though, but I think it shouldn't happen.

Can someone shed some light?

Thank you.

[toc] | [next] | [standalone]


#258151

FromGeert Stappers <stappers@stappers.nl>
Date2023-05-12 07:20 +0200
Message-ID<Gutm9-8ifP-3@gated-at.bofh.it>
In reply to#258150
On Fri, May 12, 2023 at 12:07:00AM -0500, Igor Korot wrote:
> Hi, ALL,
> Is there a reason I can't run "ssh-keygen" as a regular user?
 
Several  :-)


> I am able to do it as "root" though, but I think it shouldn't happen.
> 
> Can someone shed some light?
 
Find a better way to open a discussion as a closed question[1].


> Thank you.

Start with sharing information how to reproduce[2] the issue.


Groeten
Geert Stappers

[1] Avoid questions that can be answered with 'yes' or 'no'.
[2] Describe what is happening at your side. Tell about
    commands used and "errors" seen.
-- 
Silence is hard to parse

[toc] | [prev] | [next] | [standalone]


#258153

FromIgor Korot <ikorot01@gmail.com>
Date2023-05-12 07:50 +0200
Message-ID<GutPb-8iw0-3@gated-at.bofh.it>
In reply to#258151
Hi,

On Fri, May 12, 2023 at 12:19 AM Geert Stappers <stappers@stappers.nl> wrote:
>
> On Fri, May 12, 2023 at 12:07:00AM -0500, Igor Korot wrote:
> > Hi, ALL,
> > Is there a reason I can't run "ssh-keygen" as a regular user?
>
> Several  :-)
>
>
> > I am able to do it as "root" though, but I think it shouldn't happen.
> >
> > Can someone shed some light?
>
> Find a better way to open a discussion as a closed question[1].
>
>
> > Thank you.
>
> Start with sharing information how to reproduce[2] the issue.

[code]
igor@wxTest:~/wxwidgets$ ssh-keygem
bash: ssh-keygem: command not found
igor@wxTest:~/wxwidgets$ su
Password:
root@wxTest:/home/igor/wxwidgets# apt-get install openssh-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssh-client is already the newest version (1:7.9p1-10+deb10u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@wxTest:/home/igor/wxwidgets# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): ^C
root@wxTest:/home/igor/wxwidgets#
[/code]

[code]
igor@wxTest:~/wxwidgets$ ls -la ~/.ssh
ls: cannot access '/home/igor/.ssh': No such file or directory
igor@wxTest:~/wxwidgets$
[/code[

This is on the brand new install.

And I need that to access Git...

Thank you.

>
>
> Groeten
> Geert Stappers
>
> [1] Avoid questions that can be answered with 'yes' or 'no'.
> [2] Describe what is happening at your side. Tell about
>     commands used and "errors" seen.
> --
> Silence is hard to parse
>

[toc] | [prev] | [next] | [standalone]


#258154

FromJeremy Ardley <jeremy@ardley.org>
Date2023-05-12 08:00 +0200
Message-ID<GutYR-8iz8-1@gated-at.bofh.it>
In reply to#258153
On 11/5/23 11:22, Igor Korot wrote:
>
> [code]
> igor@wxTest:~/wxwidgets$ ssh-keygem
> bash: ssh-keygem: command not found
> igor@wxTest:~/wxwidgets$ su
> Password:
> root@wxTest:/home/igor/wxwidgets# apt-get install openssh-client
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> openssh-client is already the newest version (1:7.9p1-10+deb10u2).
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> root@wxTest:/home/igor/wxwidgets# ssh-keygen
> Generating public/private rsa key pair.
> Enter file in which to save the key (/root/.ssh/id_rsa): ^C
> root@wxTest:/home/igor/wxwidgets#
> [/code]
>
> [code]
> igor@wxTest:~/wxwidgets$ ls -la ~/.ssh
> ls: cannot access '/home/igor/.ssh': No such file or directory
> igor@wxTest:~/wxwidgets$
> [/code[
>
ssh-keygen usually works better than ssh-keygem

try

cd

mkdir .ssh

ssh-keygen


-- 
Jeremy
(Lists)

[toc] | [prev] | [next] | [standalone]


#258157

Fromjeremy ardley <jeremy@ardley.org>
Date2023-05-12 12:30 +0200
Message-ID<Guyc9-8ljm-5@gated-at.bofh.it>
In reply to#258154
On 12/5/23 13:50, Jeremy Ardley wrote:
> ode[
>>
> ssh-keygen usually works better than ssh-keygem
>
> try
>
> cd
>
> mkdir .ssh
>
> ssh-keygen
>
>
I now remember some ssh functions check file and directory permissions 
and will fail if not correct

Improved procedure:

cd

mkdir .ssh

chmod 700 .ssh

ssh-keygen

[toc] | [prev] | [next] | [standalone]


#258177

FromVincent Lefevre <vincent@vinc17.net>
Date2023-05-12 14:40 +0200
Message-ID<GuAdX-8mun-15@gated-at.bofh.it>
In reply to#258157
On 2023-05-12 18:23:41 +0800, jeremy ardley wrote:
> cd
> 
> mkdir .ssh
> 
> chmod 700 .ssh
> 
> ssh-keygen

Is there any reason why ssh-keygen doesn't create a .ssh directory
(with the right permissions) if it doesn't exist yet?

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

[toc] | [prev] | [next] | [standalone]


#258178

FromEduardo M KALINOWSKI <eduardo@kalinowski.com.br>
Date2023-05-12 14:50 +0200
Message-ID<GuAnD-8mxR-5@gated-at.bofh.it>
In reply to#258177
On 12/05/2023 09:36, Vincent Lefevre wrote:
> On 2023-05-12 18:23:41 +0800, jeremy ardley wrote:
>> cd
>>
>> mkdir .ssh
>>
>> chmod 700 .ssh
>>
>> ssh-keygen
> 
> Is there any reason why ssh-keygen doesn't create a .ssh directory
> (with the right permissions) if it doesn't exist yet?

It does, and even let's you know it did:

$ ssh-keygen 
                                               Generating public/private 
rsa key pair.
Enter file in which to save the key (/home/ekalin/.ssh/id_rsa):
Created directory '/home/ekalin/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/ekalin/.ssh/id_rsa
Your public key has been saved in /home/ekalin/.ssh/id_rsa.pub
...

-- 
<Elric> no BSD fans ?
<EvilTypeGuy> Elric: it's hard to be a gamer and a bsd fan :p

Eduardo M KALINOWSKI
eduardo@kalinowski.com.br

[toc] | [prev] | [next] | [standalone]


#258155

FromHanno 'Rince' Wagner <wagner@rince.de>
Date2023-05-12 08:10 +0200
Message-ID<Guu8x-8iRV-3@gated-at.bofh.it>
In reply to#258153
Hi Igor!

On Wed, 10 May 2023, Igor Korot wrote:

> [code]
> igor@wxTest:~/wxwidgets$ ssh-keygem
> bash: ssh-keygem: command not found

the command is ssh-keygen, not ssh-keygem.

> openssh-client is already the newest version (1:7.9p1-10+deb10u2).

that means, you already installed the necessary tools - good!

> root@wxTest:/home/igor/wxwidgets# ssh-keygen

now try _that_ command as normal user please.

best regards, Hanno Wagner
-- 
|  Hanno Wagner  | Member of the HTML Writers Guild  | Rince@IRC      |
| Eine gewerbliche Nutzung meiner Email-Adressen ist nicht gestattet! |
| 74 a3 53 cc 0b 19 - we did it!          |    Generation @           |
#  Fachbegriffe der Informatik einfach erklaert, Teil 62:
#  "professionelles Arbeiten" == "Tetris ist nicht auf der Festplatte"
#                                       (Sebastian Kokemohr-Schmidt)

[toc] | [prev] | [next] | [standalone]


#258152

FromJeremy Ardley <jeremy@ardley.org>
Date2023-05-12 07:20 +0200
Message-ID<Gutm9-8ifP-1@gated-at.bofh.it>
In reply to#258150
On 12/5/23 13:07, Igor Korot wrote:
> Hi, ALL,
> Is there a reason I can't run "ssh-keygen" as a regular user?
>
> I am able to do it as "root" though, but I think it shouldn't happen.
>
Check the file permissions and ownership of ~/.ssh files ?
>
-- 
Jeremy
(Lists)

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web