TUTORIAL: Using ssh and scp

Yes. My prompt is now purism@[mydevicename].
I changed it in Settings/About.

It should be ssh [user]@ipaddress

If you type whoami at the L5 Terminal, that is what should go into [user]

1 Like

Ah! Okay. That worked. I thought it was the wrong command because it threw an error earlier (No route to host).
Thanks!

Why is it that Settings/Sharing tells me I can connect via ssh [devicename].local?

2 Likes

That is a good question :slight_smile: I’m looking at Settings-Sharing now, and I’ve never used that exact syntax.

On a multi-user Linux system (I run a couple), you can have multiple users. They each log in with [user]@[thedomain.com] (ex. fake_user_1@myfakedomain.com). Since [user] goes before the @, that allows multiple different users to connect.

On both my servers, and on the L5, I did turn off password authentication, and only use public key authentication. If you want to do that, I wrote some instructions that were included here:

Thanks again. I will look into that. or now I am very happy I have ssh working.

1 Like

Because it is assuming that the username is the same on both ends.

‘Both ends’, as in server and client?
I don’t see how that works. We are talking device names, not user names.
And neither the device names, nor the user names are the same here. (And why would they be?)

Edit: Ah, unless you mean that if the user name on the tablet I use as a client is ‘purism’, I could login using the [device name].local address.
This begs the question, why would I use ‘purism’ on a Surface tablet?! (It is rocking Ubuntu, not PureOS.)

Yes, if user name is the same on both client and server it can be omitted.

User name is on the left of the ‘@’ and host is on the right of the ‘@’. Host can be IP address, or hostname if it is in /etc/hosts or DNS. If there is no ‘@’ the CLI ssh assumes the user/account name is the same on both client and server.

And purism@devicename.local does work, i see.
(Even with the actual user name on the client side being different.)

This info should be in the tips&tricks. If not in te Settings/Sharing page itself.

If you specify the user name on the server the user name on the client does not matter at all. I for one am glad that ssh works the same on everything from Raspberry Pi 0 to super computer clusters.

Noted. What specifically are you seeking to have added?

In short: the stuff mentioned above.

The fact that

  • the user name on the client is not relevant (I assumed it was sort of compulsory to use the user name on the client side to log in).
  • you do have to use the user name on the server side to log in.
  • one has to stick a username@ in front of the [device name].local, in order to log in via that address.
  • there are more sharing options available in Settings/Sharing.
  • the available directories will show up in the file browser.
1 Like

OK, I added text that hopefully covers your first three bullet points.

I typically do everything from the command line so can’t really cover the last two bullet points.

great! hope it prevents some frustration here and there.
last to points are more of an extra, not a prerequisite for establishing a connection.