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


Groups > linux.debian.user > #172707

Re: RESOLVED Re: sending authorized_keys to localhost from an account being created with adduser --disabled-password [was] Re: Need a tutorial

From Stephan Beck <sbeck@secure.mailbox.org>
Newsgroups linux.debian.user
Subject Re: RESOLVED Re: sending authorized_keys to localhost from an account being created with adduser --disabled-password [was] Re: Need a tutorial
Date 2016-09-23 16:00 +0200
Message-ID <skzbb-4lr-15@gated-at.bofh.it> (permalink)
References (1 earlier) <sjSzf-2R4-25@gated-at.bofh.it> <skegq-8a2-37@gated-at.bofh.it> <skg8z-Rq-67@gated-at.bofh.it> <skxVM-3F6-17@gated-at.bofh.it> <skyoN-44f-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

Stephan Beck:
> Hi
> 
> Stephan Beck:
>> Hi
>>
>> tomas@tuxteam.de:
>>> On Thu, Sep 22, 2016 at 03:35:00PM +0000, Stephan Beck wrote:
>>>
>>>
> 
>> How do I get this public key onto localhost?
> 
> No need to reply, I'll send the answer to document my solution within
> minutes.

Solution (feel free to comment)

#setting password authentication to no
root@mymachine nano /etc/ssh/sshd_config
root@mymachine:~# su - test
test@mymachine:~/.ssh$ chmod 600 authorized_keys
test@mymachine:~/.ssh$ dd if=id_rsa.pub of=authorized_keys
[test@mymachine:~/.ssh$ ssh localhost 'cat >> .ssh/authorized_keys']
test@mymachine:~/.ssh$ ssh -v test@localhost
[..many debug1 messages]
Enter passphrase for key /home/test/.ssh/id_rsa.pub':
debug1: Authentication succeeded (publickey).
Authenticated to localhost ([127.0.0.1]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = de_DE.UTF-8

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
test@mymachine:~$


I think the one put in square brackets by me is redundant, isn't it? I
remember that the system hung for a moment and I did a CTRL-C to abort,
and proceeded with the next command, and then always used the -v option.
How did I find it? I remembered that somewhere in the manpages (not
sure) there was a reference to better make use of dd to copy, and I just
tried.

Have a nice weekend!

Stephan

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Need a tutorial Gene Heskett <gheskett@shentel.net> - 2016-09-21 16:20 +0200
  Re: Need a tutorial Greg Wooledge <wooledg@eeg.ccf.org> - 2016-09-21 16:30 +0200
    Re: Need a tutorial Gene Heskett <gheskett@shentel.net> - 2016-09-21 22:40 +0200
      Re: Need a tutorial Lars Noodén <lars.nooden@gmail.com> - 2016-09-22 09:50 +0200
        Re: Need a tutorial <tomas@tuxteam.de> - 2016-09-22 10:50 +0200
        Re: Need a tutorial Gene Heskett <gheskett@shentel.net> - 2016-09-22 13:20 +0200
          Re: Need a tutorial <tomas@tuxteam.de> - 2016-09-22 14:10 +0200
            Re: Need a tutorial Gene Heskett <gheskett@shentel.net> - 2016-09-22 18:00 +0200
              Re: Need a tutorial Lars Noodén <lars.nooden@gmail.com> - 2016-09-22 18:10 +0200
                Re: Need a tutorial Gene Heskett <gheskett@shentel.net> - 2016-09-22 18:40 +0200
          Re: Need a tutorial Lars Noodén <lars.nooden@gmail.com> - 2016-09-22 14:10 +0200
            Re: Need a tutorial Gene Heskett <gheskett@shentel.net> - 2016-09-22 18:20 +0200
              Re: Need a tutorial davidson@freevolt.org - 2016-09-23 05:10 +0200
    Re: Need a tutorial Jude DaShiell <jdashiel@panix.com> - 2016-09-22 15:50 +0200
      Re: Need a tutorial Gene Heskett <gheskett@shentel.net> - 2016-09-22 18:20 +0200
  Re: Need a tutorial <tomas@tuxteam.de> - 2016-09-21 18:30 +0200
    Re: Need a tutorial Gene Heskett <gheskett@shentel.net> - 2016-09-21 22:50 +0200
    Re: Need a tutorial Stephan Beck <sbeck@secure.mailbox.org> - 2016-09-22 17:40 +0200
      Re: Need a tutorial Greg Wooledge <wooledg@eeg.ccf.org> - 2016-09-22 17:50 +0200
        Re: Need a tutorial Stephan Beck <sbeck@secure.mailbox.org> - 2016-09-22 18:20 +0200
      Re: Need a tutorial Stephan Beck <sbeck@secure.mailbox.org> - 2016-09-22 18:10 +0200
      Re: Need a tutorial "Thomas Schmitt" <scdbackup@gmx.net> - 2016-09-22 18:20 +0200
        Re: Need a tutorial Greg Wooledge <wooledg@eeg.ccf.org> - 2016-09-22 18:20 +0200
          Re: Need a tutorial "Thomas Schmitt" <scdbackup@gmx.net> - 2016-09-22 18:30 +0200
            Re: Need a tutorial Stephan Beck <sbeck@secure.mailbox.org> - 2016-09-22 20:10 +0200
            Re: Need a tutorial Stephan Beck <stebe@mailbox.org> - 2016-09-22 20:30 +0200
        Re: Need a tutorial Stephan Beck <sbeck@secure.mailbox.org> - 2016-09-22 19:00 +0200
      Re: Need a tutorial <tomas@tuxteam.de> - 2016-09-22 19:40 +0200
        sending authorized_keys to localhost from an account being created  with adduser --disabled-password [was] Re: Need a tutorial Stephan Beck <sbeck@secure.mailbox.org> - 2016-09-23 14:40 +0200
          Re: sending authorized_keys to localhost from an account being created with adduser --disabled-password [was] Re: Need a tutorial Greg Wooledge <wooledg@eeg.ccf.org> - 2016-09-23 15:00 +0200
            Re: sending authorized_keys to localhost from an account being  created with adduser --disabled-password [was] Re: Need a tutorial Stephan Beck <sbeck@secure.mailbox.org> - 2016-09-23 16:20 +0200
              Re: sending authorized_keys to localhost from an account being  created with adduser --disabled-password [was] Re: Need a tutorial Stephan Beck <sbeck@secure.mailbox.org> - 2016-09-23 16:20 +0200
            Re: sending authorized_keys to localhost from an account being  created with adduser --disabled-password [was] Re: Need a tutorial Stephan Beck <sbeck@secure.mailbox.org> - 2016-09-23 22:30 +0200
          RESOLVED Re: sending authorized_keys to localhost from an account  being created with adduser --disabled-password [was] Re: Need a tutorial Stephan Beck <sbeck@secure.mailbox.org> - 2016-09-23 15:10 +0200
            Re: RESOLVED Re: sending authorized_keys to localhost from an account  being created with adduser --disabled-password [was] Re: Need a tutorial Stephan Beck <sbeck@secure.mailbox.org> - 2016-09-23 16:00 +0200
          Re: sending authorized_keys to localhost from an account being  created with adduser --disabled-password [was] Re: Need a tutorial <tomas@tuxteam.de> - 2016-09-23 15:20 +0200
            Re: sending authorized_keys to localhost from an account being  created with adduser --disabled-password [was] Re: Need a tutorial Stephan Beck <sbeck@secure.mailbox.org> - 2016-09-23 18:50 +0200
              Re: sending authorized_keys to localhost from an account being  created with adduser --disabled-password [was] Re: Need a tutorial <tomas@tuxteam.de> - 2016-09-24 16:10 +0200
  Re: Need a tutorial Dominique Dumont <dod@debian.org> - 2016-09-22 17:30 +0200
    Re: Need a tutorial Gene Heskett <gheskett@shentel.net> - 2016-09-22 18:40 +0200
      Re: Need a tutorial Greg Wooledge <wooledg@eeg.ccf.org> - 2016-09-22 19:00 +0200
        Re: Need a tutorial Bob Bernstein <poobah@ruptured-duck.com> - 2016-09-22 20:10 +0200
          Re: Need a tutorial "Thomas Schmitt" <scdbackup@gmx.net> - 2016-09-22 21:00 +0200
      Re: Need a tutorial Lars Noodén <lars.nooden@gmail.com> - 2016-09-22 19:10 +0200
      Re: Need a tutorial Dominique Dumont <dod@debian.org> - 2016-09-22 20:20 +0200
        Re: Need a tutorial Greg Wooledge <wooledg@eeg.ccf.org> - 2016-09-22 20:40 +0200
          Re: Need a tutorial Dominique Dumont <dod@debian.org> - 2016-09-22 20:50 +0200
        Re: Need a tutorial Gene Heskett <gheskett@shentel.net> - 2016-09-23 04:30 +0200
          Re: Need a tutorial Dominique Dumont <dod@debian.org> - 2016-09-23 09:20 +0200

csiph-web