I'm new to the whole ssh thing so I don't have a big idea of it.

From my linux laptop, I can connect to my school's internet by typing

ssh <school username>@<school.edu> ... then it proceeds to ask me my school account password.

I have a laptop and a desktop (both run linux), that use the same internet. I want to connect from my laptop to my desktop. The only part is I don't know what to put for the <school username>@<school.edu> part of it. To connect, do I need to buy a host? How do I connect from laptop to my desktop.


Short answer is yes, you can do that.

The long answer is, if you did not know you can do that, then it is possible that sshd is not running your desktop PC yet.

How to check for sshd:

  • In a terminal on the Desktop, type ps auxwww | grep sshd.
  • If you get something like ... /usr/sbin/sshd then you have sshd installed and running. Move on to how to connect part. If not, install sshd using your package manager.

Install sshd or Openssh Server (if needed). In most current Linux versions typing sshd in a terminal will let you know what to do. At a guess it will be something like:

sudo apt-get install openssh-server

After the install on the Desktop you should be able to connect from the Laptop to the Desktop.

Connecting to the Desktop over ssh. You need to know either the name of your Desktop on the local network or the IP. I'm going with the IP in this example as it is a more certain way to connect. From the Laptop, type:

ssh <desktop user name>@<ip of desktop>

If your username is the same on the Laptop and the Desktop, you can drop the username part. For example:

ssh <ip of desktop>

If your Desktop has a network name (lets call it "desktop") and you can ping it, you should be able to replace the IP with the network name. For example:

ssh desktop

And if you want skip the password entry, you need to look in to ssh-keygen. But that is another topic really :]

| improve this answer | |
  • Thank you! I did look into ssh-keygen and now I can log in without password ;) thanks alot for your help to take the time and write all this – K Split X Jul 16 '17 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.