LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-08-2007, 08:08 AM   #1
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 440

Rep: Reputation: 32
connecting my laptop to my desktop


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,
 
Old 08-08-2007, 08:13 AM   #2
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Rep: Reputation: 47
Try:

Code:
man mount
Not sure on the exact syntax in Slackware, but it will be something along the lines of:

Code:
mount remote_host:/remote/dir /local/dir

Last edited by rizhun; 08-08-2007 at 08:15 AM.
 
Old 08-08-2007, 08:19 AM   #3
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,213

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
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.

If you need help, just ask.
 
Old 08-08-2007, 08:51 AM   #4
reverse
Member
 
Registered: Apr 2007
Distribution: Gentoo
Posts: 337

Rep: Reputation: 30
adityavpratap: I have a similar home set-up (recent), just curious what router you have.
 
Old 08-08-2007, 10:29 AM   #5
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Aditya Pratap,

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.

Regards,

-Drew
 
Old 08-08-2007, 01:39 PM   #6
reverse
Member
 
Registered: Apr 2007
Distribution: Gentoo
Posts: 337

Rep: Reputation: 30
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.
 
Old 08-08-2007, 03:11 PM   #7
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by reverse
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.

Regards,

-Drew
 
Old 08-08-2007, 04:10 PM   #8
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
Quote:
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.
 
Old 08-08-2007, 10:21 PM   #9
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 440

Original Poster
Rep: Reputation: 32
Hey thanks a lot guys, for your prompt replies. I plan to set up ssh. I'll keep you posted with any progress.
 
Old 08-09-2007, 07:22 AM   #10
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 440

Original Poster
Rep: Reputation: 32
Hey, it was a piece of cake when I followed your advice. Now I am able to access my desktop from the laptop.
 
Old 08-09-2007, 09:27 AM   #11
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 440

Original Poster
Rep: Reputation: 32
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)
 
Old 08-09-2007, 10:55 AM   #12
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,213

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
Quote:
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.

If you look at the example here:

http://www.linuxquestions.org/linux/...authentication

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.

Hope this helps.
 
Old 08-09-2007, 07:53 PM   #13
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
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.)

Brian
 
Old 08-10-2007, 08:32 AM   #14
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by BCarey
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.)

Brian
Wow! I didn't know that. I'll have to try it.

Thanks,

-Drew
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting Another Monitor to Laptop KimInWis General 2 01-14-2006 08:05 AM
connecting desktop to laptop video harisund Linux - Hardware 1 11-21-2005 07:56 AM
connecting laptop & desktop for NFS install yocompia Slackware 9 08-27-2003 10:21 PM
connecting laptop to desktop using slack boot cd icyfire Slackware 1 02-11-2003 07:24 PM
Connecting a laptop to a desktop... Citizen Bleys Linux - General 3 11-05-2001 10:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration