× NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Orbi WiFi 7 RBE973
Reply

Download Key SSH M4100-26G

gustavouepb
Aspirant

Download Key SSH M4100-26G

I'm trying to download the ssh key for the M4100-26G switch, but the message "key file not valid" only appears. Can anyone suggest a solution as I've found little about the problem so far?

Message 1 of 10
schumaku
Guru

Re: Download Key SSH M4100-26G

What does SSH -> SSH Configuration show ... something like Keys Present: No ?

Message 2 of 10
gustavouepb
Aspirant

Re: Download Key SSH M4100-26G

Yes, but I'm trying to enter the public key of the PC I use to manage it and it says "Key file not valid!". I've already formatted the key with the command ssh-keygen -f netgear.pub -e -m RFC4716 > netgearsw, but it still doesn't work.

Message 3 of 10
raoni
Aspirant

Re: Download Key SSH M4100-26G

Schumaku look this topic:

 

https://community.netgear.com/t5/Managed-Switches/ssh-and-shared-keys/td-p/1221786

 

Probably is the same problem of tacoman.

Message 4 of 10
schumaku
Guru

Re: Download Key SSH M4100-26G

Don't we talk of SSH here? Not of https SSL/TLS with private and public keys. AFAIK, the SSH key can be generated for SSH-1 (obsolete) and SSH-2 on the device, the switch itself - from there you can download it to your SSH workstation:

 

SSH Host Key Management 1.PNGSSH Host Key Management 2 Download only.PNGSSH Host Key Management 3 Download only.PNG

Message 5 of 10
gustavouepb
Aspirant

Re: Download Key SSH M4100-26G

My PC's public key loaded via the web gui looks like this.netgear.png

And when it is via telnet it gets the message key file not valid. The process I want to do is send my public key to the switch to authenticate using my key and not with the switch login and password. Thank you for the help, I've tried several ways and nothing so far and here in the community I only found this topic posted by Raoni.

Message 6 of 10
schumaku
Guru

Re: Download Key SSH M4100-26G

That's a TFTP push from the switch to the TFTP server. TFTP data and path is correct?

 

Re-create a new SSH-2 RSA key is not possible either? 

Message 7 of 10
gustavouepb
Aspirant

Re: Download Key SSH M4100-26G

They are correct, the server shows in the log that the file was completely downloaded. I have already re-created the key several times with the following commands:
1. ssh-keygen -f swnetgear.pub -e -m PEM > netgearsw.pem
2. ssh-keygen -f swnetgear.pub -e -m RFC4716 > netgearsw
3. ssh-keygen -t rsa -m PEM
The switch firmware is version 10.0.2.35. Any idea what it is? Because the switch doesn't offer any logging that helps.

Message 8 of 10
gustavouepb
Aspirant

Re: Download Key SSH M4100-26G

I found this question about the M5300 switch (https://community.netgear.com/t5/Managed-Switches/Key-based-SSH-authentication-on-M5300/td-p/1621508) where the conclusion reached was that it is not possible to send the user key to the switch. Is that really it? @schumaku @FURRYe38 @raoni 

Message 9 of 10
schumaku
Guru

Re: Download Key SSH M4100-26G


@gustavouepb wrote:

I found this question about the M5300 switch (https://community.netgear.com/t5/Managed-Switches/Key-based-SSH-authentication-on-M5300/td-p/1621508) where the conclusion reached was that it is not possible to send the user key to the switch. Is that really it? @schumaku @FURRYe38 @raoni 


Yes, create the key on the switch (for SSH-2 of course) ....

 

@schumaku wrote:

That's a TFTP push from the switch to the TFTP server. TFTP data and path is correct?

... at the end of the day that's a download from the switch to the PC.

Message 10 of 10
Top Contributors
Discussion stats
  • 9 replies
  • 547 views
  • 0 kudos
  • 3 in conversation
Announcements