SSH Access - Upload SSH public-key - Access denied

If your problem doesn't fall into one of the other categories, report it here.

Moderator: Moderators

imbaSD
Posts: 32
Joined: Tue Feb 14, 2017 9:25 am

SSH Access - Upload SSH public-key - Access denied

Post by imbaSD »

Yesterday i was trying to setup a SSH Access via Key that i generate with Puttygen. So i make a key and save the public key file and private.
When i try to upload the public file through GUI - Router Access i experience problem and couldnt access the router.

What i did

Generate the keys with PuTTYgen v0.73 - RSA 2048 and save them at PC

Go to Router Access and at Upload SSH public-key: i chose the public key (no matter what name i put public/public.pub/my/gargoyle.pub/gargoyle) and at SSH Key Name: i put different names (my/gargoyle/etc...)

Disable password access before you enable remote SSH access

At WinSCP or PuTTy i set up the location of private key (.ppk)

and when i try to connect i get error that my key wasnt accepted. Even i try with different ports but the result same (btw i was connected wirelessly to my router)

After a lot of hours of Trying i found that the keys are stored at /etc/dropbear/authorized_keys and when i open the file i saw only the SSH Key Name: that i put (my/gargoyle/etc...) nothing else, so i delete everything and paste manually the key-string from puttygen and save it. Then i Disable password access before you enable remote SSH access, enable the SSH and vioala i was connected :)


Was i doing something wrong via GUI?
TP-Link Archer C7 v2 @1.12

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: SSH Access - Upload SSH public-key - Access denied

Post by Lantis »

Firstly, don't disable password access until you're sure that keyed access is working.

There may be some error in the browser.
When you upload the key file, what do you see in the table?
You should see a preview of the key and the name that you entered.

If you can check the browser console for errors, this may help diagnose it.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

imbaSD
Posts: 32
Joined: Tue Feb 14, 2017 9:25 am

Re: SSH Access - Upload SSH public-key - Access denied

Post by imbaSD »

Lantis wrote:Firstly, don't disable password access until you're sure that keyed access is working.

There may be some error in the browser.
When you upload the key file, what do you see in the table?
Just made a test file and upload
https://drive.google.com/file/d/1guODc9 ... sp=sharing
Lantis wrote:If you can check the browser console for errors, this may help diagnose it.
I am using Chrome, could you tell me how to perform this?
TP-Link Archer C7 v2 @1.12

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: SSH Access - Upload SSH public-key - Access denied

Post by Lantis »

There's nothing obviously wrong there.

Press F12 in the browser, and watch the console for errors when you hit "save changes".
Again, i'd advise that you don't disable password access while you're experiencing this issue.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

imbaSD
Posts: 32
Joined: Tue Feb 14, 2017 9:25 am

Re: SSH Access - Upload SSH public-key - Access denied

Post by imbaSD »

hope did it correct, as you can see with new test key access denied but with other key (witch i enter manually as i mention in the beginning) all are ok

https://drive.google.com/file/d/16VsZFG ... sp=sharing
https://drive.google.com/file/d/1jD6d6s ... sp=sharing
https://drive.google.com/file/d/1X5HP2V ... sp=sharing
TP-Link Archer C7 v2 @1.12

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: SSH Access - Upload SSH public-key - Access denied

Post by Lantis »

Nothing out of the ordinary there.
Can you please delete both keys, then load the failed one again via the GUI, and provide a "logread" around 60 seconds after pressing save changes?
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

imbaSD
Posts: 32
Joined: Tue Feb 14, 2017 9:25 am

Re: SSH Access - Upload SSH public-key - Access denied

Post by imbaSD »

Sorry for delay of replay
Here we are, seems same. Was more than 60 sec

https://drive.google.com/open?id=1SKSKR ... oOICTbQFIp
TP-Link Archer C7 v2 @1.12

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: SSH Access - Upload SSH public-key - Access denied

Post by Lantis »

Is there a logread with it? I don't see one.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

imbaSD
Posts: 32
Joined: Tue Feb 14, 2017 9:25 am

Re: SSH Access - Upload SSH public-key - Access denied

Post by imbaSD »

My mistake, here we are

Code: Select all

Thu Jan 16 20:09:12 2020 authpriv.info dropbear[5093]: Child connection from 222.186.52.189:38992
Thu Jan 16 20:09:41 2020 local5.notice qosmon[19401]: terminated sigterm=15, sel_err=0
Thu Jan 16 20:09:45 2020 authpriv.info dropbear[5093]: Exit before auth: Disconnect received
Thu Jan 16 20:09:59 2020 kern.info kernel: [1405742.671082] IMQ driver unloaded successfully.
Thu Jan 16 20:09:59 2020 kern.info kernel: [1405742.729505] 	Hooked IMQ after mangle on INPUT
Thu Jan 16 20:09:59 2020 kern.info kernel: [1405742.734434] 	Hooked IMQ after mangle on FORWARD
Thu Jan 16 20:09:59 2020 kern.info kernel: [1405742.739754] IMQ driver loaded successfully. (numdevs = 1, numqueues = 1, imq_dev_accurate_stats = 1)
Thu Jan 16 20:09:59 2020 kern.info kernel: [1405742.749812] 	Hooking IMQ before NAT on PREROUTING.
Thu Jan 16 20:09:59 2020 kern.info kernel: [1405742.755394] 	Hooking IMQ after NAT on POSTROUTING.
Thu Jan 16 20:09:59 2020 daemon.err insmod: module is already loaded - cls_fw
Thu Jan 16 20:09:59 2020 daemon.err insmod: module is already loaded - cls_flow
Thu Jan 16 20:10:00 2020 daemon.err insmod: module is already loaded - sch_hfsc
Thu Jan 16 20:10:00 2020 daemon.err insmod: module is already loaded - sch_sfq
Thu Jan 16 20:10:08 2020 local5.info qosmon[6351]: starting socketfd = 5, statusfd = 4
Thu Jan 16 20:12:01 2020 authpriv.info dropbear[7951]: Child connection from 222.186.42.155:20110
TP-Link Archer C7 v2 @1.12

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: SSH Access - Upload SSH public-key - Access denied

Post by Lantis »

That's not the full log.

I'm not able to solve this for you sorry.
Unless someone else can demonstrate they also get the error, and can show me a way to reproduce it 100% of the time, it's just not possible for me to guess a fix.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply