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
- 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.
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>
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:
And if you want skip the password entry, you need to look in to
ssh-keygen. But that is another topic really :]