What's new

Passwordless SSH from MacBook to Merlin

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

jnsie

New Around Here
I'd like to SSH to my router without a password from a Mac(book pro). I'm new to Merlin and would appreciate if anyone could explain how to achieve this? So far I've tried generating keys on my Mac, and populating the Authorized Keys section in the Web UI. I've also attempted to copy the key over via ssh-copy-id. I'm still prompted for a password when I attempt to SSH in. Any help is much appreciated!
 
You’ve put the public key (contents of id_rsa.pub) in the web UI keys box right?

The ssh-copy-id should also work, but would be wiped out after a reboot.


Sent from my iPhone using Tapatalk
 
You’ve put the public key (contents of id_rsa.pub) in the web UI keys box right?

The ssh-copy-id should also work, but would be wiped out after a reboot.


Sent from my iPhone using Tapatalk


Thanks for your response! Good info re: ssh-copyid. Yes, I'm copying the public key into the web Authorized Keys box. I just started from scratch with the same results. Below are the steps I followed a moment ago:

  • ssh-keygen -t rsa -b 4096 -C "<my email address>"
  • eval $(ssh-agent -s)
  • ssh-add ~/.ssh/id_rsa
  • cat ~/.ssh/id_rsa.pub
  • Copy the contents to the Authorized Keys section under the System>Service section in Merlin.
  • Attempted to ssh as admin@192.168.0.58 (router IP...) but still got prompted for password
 
Seems reasonable to me! Tried rebooting the router?

Or manually adding the key to /root/.ssh/authorized_keys on the router? Or indeed see if your key is in there at all! If it’s missing then either the format it’s going into the web UI is wrong or maybe it needs a reboot to push it from NVRAM to that file.


Sent from my iPhone using Tapatalk
 
Seems reasonable to me! Tried rebooting the router?

Or manually adding the key to /root/.ssh/authorized_keys on the router? Or indeed see if your key is in there at all! If it’s missing then either the format it’s going into the web UI is wrong or maybe it needs a reboot to push it from NVRAM to that file.


Sent from my iPhone using Tapatalk

Well I'll be damned. The reboot worked. Can't tell you how many times I've instructed others to reboot their PC/router/device over the years. Thanks for the tip - that helped greatly!
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top