Jump to content

Why is setting up SSH on Alpine such a pain...


wa4chq

Recommended Posts

I've never had problems using SSH but with Alpine, after it's set up...I can't log in remotely cuz it uses Key authentication and that seems to set up automagically.   I've looked all over for a simple to understand tutorial showing how to disable the need for a key authentication  and just use an easy to remember password....no luck.  In a previous post, there was talks about setting up whatever version of linux you're using and then leaving it alone....and I said I can't do that and eventually I end up hosing everything.....well, I'm feeling like I'm getting close to that spot...again.   lol

Link to comment
Share on other sites

V.T. Eric Layton

I've never set up anything on Alpine, so I couldn't really say why it would be a pain in the posterior area.

Link to comment
Share on other sites

2 minutes ago, V.T. Eric Layton said:

I've never set up anything on Alpine, so I couldn't really say why it would be a pain in the posterior area.

When you first boot Alpine, as root you enter "setup-alpine" and then run down the list.  On the list, it asks you about openssh.  And then quits making sense to me.  It'd help if The-really-be Betty did a YouTube tutorial on it.

Link to comment
Share on other sites

V.T. Eric Layton

I'm afraid that Bettie doing a tutorial about Alpine and SSH would be a bit distracting.

Link to comment
Share on other sites

securitybreach

Just remove the offending key from ~/.ssh/known_hosts . It's not an alpine issue but an ssh issue.

Link to comment
Share on other sites

securitybreach

Oh wait, you did it as root? Why?
 

Then it would be /root/.ssh/known_hosts

Link to comment
Share on other sites

3 hours ago, securitybreach said:

The key is located in the .ssh/known_hosts file

I will take a look.  I do that when using ssh normally but that's using my own password that I've created, not a random generated key....

Link to comment
Share on other sites

securitybreach
11 hours ago, wa4chq said:

I will take a look.  I do that when using ssh normally but that's using my own password that I've created, not a random generated key....

 

Well one way to secure ssh is to use fingerprints (keys) instead of plaintext passwords.

Link to comment
Share on other sites

39 minutes ago, securitybreach said:

 

Well one way to secure ssh is to use fingerprints (keys) instead of plaintext passwords.

My problem is when Alpine auto sets up openssh and gives it a key and I want to access alpine from a remote desktop, I want to be able to use a simple, easy to remember password.  I'm not really concerned about how secure it is.  Setting up ssh on every thing I've used except for Alpine has been easy.  I found these articles and need to read them over.  Openssh and SSH

Link to comment
Share on other sites

securitybreach
2 minutes ago, wa4chq said:

My problem is when Alpine auto sets up openssh and gives it a key and I want to access alpine from a remote desktop, I want to be able to use a simple, easy to remember password.  I'm not really concerned about how secure it is.  Setting up ssh on every thing I've used except for Alpine has been easy.  I found these articles and need to read them over.  Openssh and SSH

 

Oh you don't actually need to know the key. It's used as as a secure handshake. Once you accept the fingerprint and put in the password, it stores the key which is used to identify you.

 

Further explanation: https://wiki.archlinux.org/title/SSH_keys

Link to comment
Share on other sites

7 hours ago, securitybreach said:

 

Oh you don't actually need to know the key. It's used as as a secure handshake. Once you accept the fingerprint and put in the password, it stores the key which is used to identify you.

 

Further explanation: https://wiki.archlinux.org/title/SSH_keys

That sounds simple enough but when it does the fingerprint, it hasn't asked to set up a password....unless it uses root password (for now)

Link to comment
Share on other sites

securitybreach
7 minutes ago, wa4chq said:

That sounds simple enough but when it does the fingerprint, it hasn't asked to set up a password....unless it uses root password (for now)

 

That depends on how you set it up. You can use a password with a fingerprint, just a password or just a fingerprint.

Link to comment
Share on other sites

Just now, securitybreach said:

 

That depends on how you set it up. You can use a password with a fingerptint, just a password or just a fingerprint.

OK...it seems then to just do fingerprint.....l will do it later, but I'll do a VM of Alpine and when I get to that spot, I'll take a screenshot.   I might be telling you the wrong thing....

  • Like 1
Link to comment
Share on other sites

The jpeg is an example of Alpine sshd setup.  I went with the defaults.  I just want to try Alpine on a headless RPi, I have never setup SSHD (as I recall).  I'm not concerned about security etc.  When I use Raspberry Pi OS, I can enable SSH two ways...before writing to the micro SD card or after booting and running "raspberry-config".  Simple.  I haven't tried this example yet....editing /etc/ssh/sshd_config , halfway down under "Alpine Linux Initial Setup".  This might be all I need to do. 

sshd_alpine_key_ex.jpg

  • Like 1
Link to comment
Share on other sites

securitybreach
4 minutes ago, wa4chq said:

I got it working.  Editing /etc/ssh/sshd_config worked.  Now let me start tricking it out...😆

 

Nice

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...