SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
Though I have been using Linux for quite some time now, I know next to nothing about networking.
My present problem -
I have a desktop running Slackware 11.0 and a laptop running the same. The desktop is connected to a wireless router through a lan cable. The laptop is connected to the same wireless router through wireless connection. I am able to browse the net simultaneously through both the systems. The IP address of the laptop is 192.168.1.35 and that of the desktop is 192.168.1.2. The router has the usual IP address 192.168.1.1
I want to know if there is a way I can access each system from the other system in the simplest possible manner. I am vaguely aware that ssh may be a solution, but I am not sure.
Kindly advice,
You have everything you need, other than the knowledge of how to do it.
Yes, ssh is one type of communication. This will give you a command line on the other machine, can work either way. SSH is secure, so you need to log on to the other machine. Use an existing account and password. If that gets cumbersome, look into setting up keys. Then all you do is ssh ipaddressoftargetmachine and the keys look after the authentication.
The home network you describe is all the hardware you need. You should be able to open a konsole and ping the other box, both ways.
You can even run an X session program across this type of connection. When you start the session, use the -X option, and then once connected, start the application on the remote, and the X part gets forwarded to the client.
You can also share files and directories, even whole disks using NFS with two linux boxes. NFS is not too difficult to set up. If you look on the tutorial section, under networking you will find some how to's that can help with both things.
Last, you can share a printer using Cups on both machines.
I have a similar set-up and this is how I "network" (I'll explain the quotes after the description).
I have my desktop computer running Slackware 11. I have a laptop running another version of Linux. I use SSH from the laptop to log into the desktop computer. I set up the SSH daemon on the desktop to allow X forwarding so that I can run X Windows programs from the desktop in my laptop's X Windows environment. I log in to the desktop using a command terminal (Konsole or Xterm) with the command "ssh -Y" followed by the IP address.
For X forwarding to work, I needed to enable it in the SSHD configuration file. I forget exactly how I did that, but I can look it up when I get home if you're interested. The configuration file is pretty well commented, and the info file is useful, which made that task easy.
The advantages of this set-up are:
I don't have to be physically logged in to the desktop to be able to access it from the laptop.
For all intents and purposes, my laptop is the desktop computer when I use SSH. If I open something through the SSH connection, it opens from the desktop. When I save something, it is saved to the desktop.
My wife can be doing her own thing on the desktop through her account, while I'm also doing something on the desktop through my account, but from my laptop.
At the same time, I can run and open things locally from my laptop.
The disadvantages lie in the fact that this set-up is not full networking as I've come to think of it.
SSH allows me to remotely run programs and access files on the desktop, but what happens on the desktop stays on the desktop. This means that I can't run Open Office locally on the laptop but open a file on the desktop through SSH. In other words, I cannot seamlessly access desktop files from my laptop.
One way around this problem is to use the secure FTP capabilities built into SSH to grab files from the desktop and copy them to the laptop's hard drive. Then I copy them back to the desktop when I'm done with them.
This isn't a major problem, but sometimes the connection between the wireless router and my laptop's wireless card drops. This does not happen often at all, but when it does, some of the programs I'm running on from the desktop freeze.
Overall, I'm pretty happy with using SSH to make my laptop a terminal for the desktop.
Lufbery: you know you could .. like .. have the X server SERVER accept connection from your laptop and .. or perhaps I'm not getting what you're doing.
Lufbery: you know you could .. like .. have the X server SERVER accept connection from your laptop and .. or perhaps I'm not getting what you're doing.
Yeah, I think we're talking about different things. I have no trouble running X applications from my desktop on my laptop through SSH with X forwarding.
SSH is the only kind of "networking" I've set up. I haven't set up a NFS or Samba or anything else.
Is that what you're getting at, or is there more? I'm still relatively new to Linux, so I'm happy to learn more.
SSH allows me to remotely run programs and access files on the desktop, but what happens on the desktop stays on the desktop. This means that I can't run Open Office locally on the laptop but open a file on the desktop through SSH. In other words, I cannot seamlessly access desktop files from my laptop.
i think nfs,coda,samba is the way to go.
it's a pity you only have a unstable connection; i guess a lot of options are ruled out by that
Last edited by erklaerbaer; 08-08-2007 at 04:16 PM.
Now I am having this strange problem -
The IP address of my laptop is 192.168.1.35, it has two users - aditya and pratap
The IP address of my desktop is 192.168.1.2, it has the same two users - aditya and pratap.
I created the keys on laptop as
$ssh-keygen -t rsa
then I tried to copy the id_rsa.pub to the desktop as follows -
$scp -p .ssh/id_rsa.pub 192.168.1.2:.ssh/
I am prompted for password. Here I have to enter the password that I use to login to aditya on Desktop. This password is different from the ssh passphrase I created on the Desktop. (If I give this passphrase, it is not accepted.)
Even though the password is accepted, the id_rsa.pub is not copied to the Desktop.
However if I ssh pratap (on Desktop) from aditya (on laptop) I am able to do so as follows -
$ssh -l pratap 192.168.1.2
I am prompted for password. Here I have to give the passphrase created for pratap (on Desktop)which is promptly accepted and a ssh session is started.
(Now that I read what I have typed, I sounds very confusing, I hope you are able to get the gist)
then I tried to copy the id_rsa.pub to the desktop as follows -
$scp -p .ssh/id_rsa.pub 192.168.1.2:.ssh/
It would appear from this you did not copy the key into the "authorized.keys" file on the desktop. This file is a collection point for all keys for all users connecting. SSH looks in there to see if the key sent when you try to connect is a known user.
2-f shows the scp straight into this file. You can also on the desktop just use a plain editor and copy and paste the public key into that file. That is the way I do it, then I know it is there. If you want to verify the name and location of the authorized keys file, look in /etc/ssh/sshd.config file in the authentication section. Usually the file will be in /home/username/.ssh/ .
Point of interest, I use Webmin to configure this sort of thing. It is a web based application, and as its name suggests, you can access it from another machine. It does reduce the need to edit config files directly. It also helps me remember things like the name of config files, six months later. I only do this sort of set up once in a while, and remembering everything is difficult. Just a suggestion you can look into.
If I understand what is going on for one user, you should not be prompted for a password at all. If you are, the keys are not being read for what ever reason. I see you decided to use a pass phrase. I used on the last time I setup ssh to my laptop. Interesting thing I can't explain, I get prompted for the pass phrase on the client when I boot the system. If I enter it, I don't get asked again until after I have re-booted. If I ssh to the laptop, it connects without any password or pass phrase. I'm running Openssh 4.2.
FYI, both Konqueror and Nautilus play very nicely with ssh, allowing you to use a file manager to access and move files between computers. With Konqueror you use "fish://" in the url window and in Nautilus you use File/Connect to Server and choose SSH as the service type. (I love the cli, but sometimes gui file managers are more efficient.)
FYI, both Konqueror and Nautilus play very nicely with ssh, allowing you to use a file manager to access and move files between computers. With Konqueror you use "fish://" in the url window and in Nautilus you use File/Connect to Server and choose SSH as the service type. (I love the cli, but sometimes gui file managers are more efficient.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.