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


Groups > linux.debian.user > #175516

Re: ssh doesn't work.

From Henning Follmann <hfollmann@itcfollmann.com>
Newsgroups linux.debian.user
Subject Re: ssh doesn't work.
Date 2016-12-07 17:00 +0100
Message-ID <sLMNs-1Yv-9@gated-at.bofh.it> (permalink)
References <sLfHP-5DA-5@gated-at.bofh.it> <sLhqh-6OF-5@gated-at.bofh.it> <sLMkp-1Oz-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Dec 08, 2016 at 12:27:53AM +0900, EenyMeenyMinyMoa wrote:
> Thank you for your reply, Andy.
> 
Please be so nice and trim your post to be meaningful and concise. Don't
just slapp something on the top.


> ufw was enabled on the server machine.
> Because I don't have enough knoledge about iptables, I did
> $ sudo ufw allow proto tcp from 192.168.0.3 to any port 9999
> on the server machine.
> Then I successfully connected from the client machine by ssh.
> 
> And next I want to do ssh with authentication key instead of password.
> I've been struggling for hours.
> I rewrited /etc/ssh/sshd_config.
> On the client machine,
> 
> PasswordAuthentication no
> AuthorizedKeysFile    %h/.ssh/authorized_keys
> UsePAM no
> 
> On the server machine,
> 
> PasswordAuthentication no
> AuthorizedKeysFile    %h/.ssh/authorized_keys
> UsePAM no
> 
> Then I tried, but
> Password:
> still appeared.
> 


Please revert to your original configs. Key login works be default and
requires no change.

first generate a key:
ssh-keygen

By default it creats both id_rsa and id_rsa.pub in your ~/.ssh directory.
id_rsa contains the private key and it should remain on the client machine
in your ~/.ssh directory.
Transfer the id_rsa.pub to the server you want to logon to.there append it
to 
cat id_rsa.pub >> <homedirectory of user>/.ssh/authorized_keys

now you should be able to ssh into that server with pk authorization.

If that works you can go on and disable the password authorization by
setting on the server sshd config

PasswordAuthentication no

-H

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


Thread

ssh doesn't work. EenyMeenyMinyMoa <eenymeenyminymoa@gmail.com> - 2016-12-06 05:40 +0100
  Re: ssh doesn't work. Andy Smith <andy@strugglers.net> - 2016-12-06 07:30 +0100
    Re: ssh doesn't work. EenyMeenyMinyMoa <eenymeenyminymoa@gmail.com> - 2016-12-07 16:30 +0100
      Re: ssh doesn't work. Henning Follmann <hfollmann@itcfollmann.com> - 2016-12-07 17:00 +0100
        Re: ssh doesn't work. EenyMeenyMinyMoa <eenymeenyminymoa@gmail.com> - 2016-12-07 18:40 +0100
          Re: ssh doesn't work. Greg Wooledge <wooledg@eeg.ccf.org> - 2016-12-07 19:00 +0100
            Re: ssh doesn't work. EenyMeenyMinyMoa <eenymeenyminymoa@gmail.com> - 2016-12-08 05:20 +0100
          Re: ssh doesn't work. Henning Follmann <hfollmann@itcfollmann.com> - 2016-12-07 19:20 +0100
            Re: ssh doesn't work. Greg Wooledge <wooledg@eeg.ccf.org> - 2016-12-07 19:50 +0100
              Re: ssh doesn't work. Henning Follmann <hfollmann@itcfollmann.com> - 2016-12-07 20:20 +0100
              Re: ssh doesn't work. Antti Talsta <atalsta@nothingtosee.org> - 2016-12-07 20:30 +0100
                Re: ssh doesn't work. Reco <recoverym4n@gmail.com> - 2016-12-07 21:30 +0100
                Re: ssh doesn't work. Henning Follmann <hfollmann@itcfollmann.com> - 2016-12-07 21:50 +0100
                Re: ssh doesn't work. Reco <recoverym4n@gmail.com> - 2016-12-07 23:20 +0100
                Re: ssh doesn't work. Darac Marjal <mailinglist@darac.org.uk> - 2016-12-08 16:40 +0100
                Re: ssh doesn't work. Reco <recoverym4n@gmail.com> - 2016-12-08 18:00 +0100
                Re: ssh doesn't work. Antti Talsta <atalsta@nothingtosee.org> - 2016-12-07 21:50 +0100
                Re: ssh doesn't work. Reco <recoverym4n@gmail.com> - 2016-12-07 23:20 +0100
              Re: ssh doesn't work. Brian <ad44@cityscape.co.uk> - 2016-12-07 21:30 +0100
                Re: ssh doesn't work. EenyMeenyMinyMoa <eenymeenyminymoa@gmail.com> - 2016-12-08 05:20 +0100
                Re: ssh doesn't work. Lisi Reisz <lisi.reisz@gmail.com> - 2016-12-08 11:10 +0100
                Re: ssh doesn't work. EenyMeenyMinyMoa <eenymeenyminymoa@gmail.com> - 2016-12-10 06:00 +0100
                Re: ssh doesn't work. Joe <joe@jretrading.com> - 2016-12-10 10:10 +0100
                Re: ssh doesn't work. Richard Hector <richard@walnut.gen.nz> - 2016-12-11 08:40 +0100
            Re: ssh doesn't work. EenyMeenyMinyMoa <eenymeenyminymoa@gmail.com> - 2016-12-08 06:50 +0100
              Re: ssh doesn't work. emetib <chadbrabec@gmail.com> - 2016-12-08 09:00 +0100
                Re: ssh doesn't work. Henning Follmann <hfollmann@itcfollmann.com> - 2016-12-08 13:50 +0100
          Re: ssh doesn't work. emetib <chadbrabec@gmail.com> - 2016-12-07 20:20 +0100

csiph-web