You are not logged in.

#1 2008-05-11 18:40:08

Reploid
Member
From: Cold Country up North
Registered: 2008-03-27
Posts: 110

Surfing the contents of my desktop from my laptop

Short Q. What do I need to browse through the content on my desktop (also using Arch) from my laptop? Both are connected to a wireless router by my roomie's computer. Is Samba the program I need to use (will take ages to read the manual) or is that just when I want to access windows computers? Is it possible to gain access to my computers seeing as they are connected to the LAN by wifi, or do they need to be cabled up?

Offline

#2 2008-05-11 18:58:49

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: Surfing the contents of my desktop from my laptop

I use ssh, as probably do most of us: http://wiki.archlinux.org/index.php/SSH. If you are using konqueror, you can just type in sftp://<ipaddress> and browse as if you were doing so locally. Just remember what machine you are looking at!

(You can get the ipaddress by entering 'ifconfig' at the command prompt.)

Offline

#3 2008-05-11 19:33:04

bradym
Arch Linux f@h Team Member
From: /dev/null
Registered: 2008-04-13
Posts: 9

Re: Surfing the contents of my desktop from my laptop

I also use ssh, but add one more step.  You can mount remote file system over ssh.  In konqueror  go to system-remote places and select "Add Network Folder", then select ssh.  The only thing is the desktop will have to have a static IP.

Offline

#4 2008-05-12 00:26:16

Reploid
Member
From: Cold Country up North
Registered: 2008-03-27
Posts: 110

Re: Surfing the contents of my desktop from my laptop

Thanks guys!

I followed the wiki you pointed at, step by step, but I can't seem to make my computers connect to each other. So I have a few basic questions, I would be really happy if somebody could answer.

The wiki lists two files to configure: /etc/ssh/ssh_config and /etc/ssh/sshb_config. Now, the wiki only specifies a few changes to be made, like changing the protocol from 2,1 to 2 and the login grace time.

Q: Have I understood it correctly, that I need to fill in more things in these textfiles? Do I need to remove many #s from the files, or are they not meant to be uncommented? Are there any n00b friendly pages that can tell me what these files should look like? Other than looking at man ssh_config.

Furthermore; the wiki says I should type

ssh -p port user@server-adress

to connect to my other computer. Is "server address" the hostname I filled in rc.conf? (In my case for my 2 computers, packardbell and archcomputer) Have I understood it correctly if all I should need to type is:

ssh -p 22 reploid@packardbell

in order to log into my packard bell desktop?

And for understanding: How does my laptop using wifi, find another desktop (also using wifi) on my LAN using the hostname? What does my d-link router do with the hostname I am typing? I take it I am not connecting directly to the desktop without stopping by the router?

I know these are basic questions, but even wikipedia seemed like latin to me. I am that great a n00b on computers. And these man pages are killing me, every 2nd word makes no sense. sad

Last edited by Reploid (2008-05-12 00:36:35)

Offline

#5 2008-05-12 01:21:17

Pudge
Arch Linux f@h Team Member
Registered: 2006-01-23
Posts: 300

Re: Surfing the contents of my desktop from my laptop

Here is a tutorial I wrote.  This works great on a wired network.  I am not familiar with the nuances of wireless.  I do not know what additional steps you would need to take for wireless, but I am guessing not many.

Perhaps you can find a few helpful tips in the tutorial that will help.

Best of Luck.

Pudge

Offline

#6 2008-05-12 06:23:34

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

Re: Surfing the contents of my desktop from my laptop

Reploid wrote:

Short Q. What do I need to browse through the content on my desktop (also using Arch) from my laptop? Both are connected to a wireless router by my roomie's computer. Is Samba the program I need to use (will take ages to read the manual) or is that just when I want to access windows computers? Is it possible to gain access to my computers seeing as they are connected to the LAN by wifi, or do they need to be cabled up?

Hi.

You could also have a look at sshfs.

Last edited by dw (2008-05-12 06:24:04)

Offline

#7 2008-05-12 13:49:50

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: Surfing the contents of my desktop from my laptop

That's a great tutorial, Pudge!

Reploid, it's probably easiest to use the ip address rather than the hostname.

Offline

#8 2008-05-12 14:42:24

Reploid
Member
From: Cold Country up North
Registered: 2008-03-27
Posts: 110

Re: Surfing the contents of my desktop from my laptop

Pudge, it is easy to follow your tutorial, or at least a lot easier than reading the man pages. I can follow you up till the 3rd page, then I get the following error:

[root@archcomputer reploid]# /etc/rc.d/sshd restart
:: Stopping Secure Shell Daemon                                          [DONE] 
:: Starting Secure Shell Daemon                                          [DONE] 
[root@archcomputer reploid]# ssh reploid@packardbell
ssh: connect to host packardbell port 8119: No route to host
[root@archcomputer reploid]#

packardbell is the hostname of my 2nd computer. All code, config files, ifconfig -a, host.allow and host.deny for my two computers, packardbell and archcomputer is found with highlighting here: http://pastebin.com/m169e31a5

Other ways of connecting don't work either. Have I understood the syntax correctly?

[root@archcomputer reploid]# ssh 192.168.0.122
ssh: connect to host 192.168.0.122 port 8119: No route to host
[root@archcomputer reploid]# ssh -p 8119 -l reploid 192.168.0.122
ssh: connect to host 192.168.0.122 port 8119: No route to host

I would appreciate it if anybody could get a quick glance of my code on pastebin, and give me a hint. Perhaps I am overlooking something simple. I tried the man pages, wikipedia and pudge's tutorial- after all, I am doing this for learning purposes, not because I so desperately need ssh at the moment. But right now, learning or not, I don't have a clue. sad Perhaps I am too stupid to learn linux.

Offline

#9 2008-05-12 15:37:00

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,899
Website

Re: Surfing the contents of my desktop from my laptop

I had ssh set up on my laptop a while ago, I used sshfs [Gnome] could fire it again to if it still works then I may be able to help you more, in the mean time google for ssh stuff there are loads of docs out there for setting this stuff up ....

http://www.linuxjournal.com/article/8904

for one... stick with it ;-)


Mr Green

Offline

#10 2008-05-12 19:44:59

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Surfing the contents of my desktop from my laptop

Two things, the most basic first: "No route to host" means that there is no network connectivity between the two machines. Can you ping from one to the other? This has to work before you can go any further.
Secondly, you show the ssh daemon starting on archcomputer, followed by a ssh connection attempt from archcomputer to packardbell. The daemon needs to run on the machine you want to connect to - packardbell, in this case.

Offline

#11 2008-05-12 22:42:00

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: Surfing the contents of my desktop from my laptop

I used to use sshfs back before my desktop starting making scary noises and I retired it. It's good if you're not using some weird DE.

Offline

#12 2008-05-12 23:41:18

raul_nds
Member
From: Lisbon, Portugal
Registered: 2007-06-28
Posts: 258

Re: Surfing the contents of my desktop from my laptop

You can also use dyndns.com if you use dynamic ip's. Your machine can have some cool names. mine was called osiris@endofinternet.org cool

Offline

#13 2008-05-13 02:31:42

Pudge
Arch Linux f@h Team Member
Registered: 2006-01-23
Posts: 300

Re: Surfing the contents of my desktop from my laptop

Reploid;

First off, and most important, you are NOT too stupid to learn Linux.  You would not have gotten as far as you have if this was the case. 

Next, your error is No route to host.  The route is set up in your /etc/rc.conf file.  Here is a snippet from your /etc/rc.conf in pastebin

#
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
#
# Wireless: See network profiles below
#
#
#
eth0="eth0 192.168.0.133 netmask 255.255.255.0 broadcast 192.168.0.255"
#
#eth0="dhcp"
#
#wlan0="dhcp"
#
#INTERFACES=(eth0)
#
 
#
# Routes to start at boot-up (in this order)
#
# Declare each route then list in ROUTES
#
#   - prefix an entry in ROUTES with a ! to disable it
#
#
#
gateway="default gw 192.168.0.1"
#
ROUTES=(!gateway)

The last section listed declares your route(s).  The error lies in the last 3 lines of the above.  When you use DHCP, the gateway is figured out by DHCP, thus the line ROUTES=(!gateway) has gateway disabled by the exclamation point in front of it.  When you changed to using static IP addresses, you must specify the gateway.  The line gateway="default gw 192.168.0.1" specifies your gateway.  This should be the LAN side IP address of your router.  In most cases it is 192.168.0.1    The owners manual of your router should supply this info.  Next, remove the exclamation point in the last line of the above snippet so it reads ROUTES=(gateway).  That will enable the gateway statement, set up your route, and should fix that problem.  Of course, you need to do this in both computers.

The next thing that affects the Routes is the /etc/hosts file.  You didn't list your hosts file, so I am not sure if it is correct or not.  It should look something like this in both computers.

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>    <hostname.domain.org>    <hostname>
127.0.0.1        localhost.localdomain    localhost

192.168.0.122      packardbell.localdomain      packardbell
192.168.0.133      archcomputer.lcoaldomain   archcomputer

# End of file

This ties an IP address to a hostname.  With out a /etc/hosts file, you can only use the syntax ssh 192.168.0.122.  With a properly setup /etc/hosts file, you can use ssh IPaddress OR ssh remotehostname, such as ssh packardbell.

What tomk said is correct.  The following isn't exactly true, but it is one way to think of it:

The ssh_config file controls how you Send or Transmit from that computer
The sshd_config file controls how you Get or Receive on that computer.

The ssh_config doesn't need to be started or initialized, but the sshd daemon, which gets it's configuration from sshd_config, needs to be running on the receiving computer.   I usually have sshd running on both computers so I can ssh both directions.

I assume you ran the ssh-keygen command as user on both machines to set up local and public keys.

An other thing I noticed is, you were trying to SSH as root.  As suggested in the tutorial, you have PermitRootLogin no in sshd_config for security purposes.  So, the correct way is to ssh as user, such as [reploid@archcomputer ~]$ ssh reploid@packardbell then once logged into the remote computer, use su to become root in the remote computer if it is necessary.

According to all Unix/Linux standards, the proper way to end a remote session is by typing in exit.

Everything else I looked at seemed to be OK.  Unless I missed something, which is easy to do.  Try these suggestions and see if it fixes things for you.  Let me know how it goes.  Hang in there, we will get this working.

Pudge

Offline

#14 2008-05-13 04:57:15

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,899
Website

Re: Surfing the contents of my desktop from my laptop

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1       localhost.localdomain   localhost
192.168.0.2     mrgreen-laptop.localdomain      mrgreen-laptop
# End of file

On my desktop .... I use DHCP so maybe I need to go for a static ip address strange thing is I can only access ssh via 192.168.0.3 ? my laptop seems only to be able to ssh into itself hmm it was a while ago when I tried this, some of the guides are a little confusing

MrG


Mr Green

Offline

#15 2008-05-13 10:09:43

Reploid
Member
From: Cold Country up North
Registered: 2008-03-27
Posts: 110

Re: Surfing the contents of my desktop from my laptop

tomk wrote:

Two things, the most basic first: "No route to host" means that there is no network connectivity between the two machines. Can you ping from one to the other? This has to work before you can go any further.
Secondly, you show the ssh daemon starting on archcomputer, followed by a ssh connection attempt from archcomputer to packardbell. The daemon needs to run on the machine you want to connect to - packardbell, in this case.

Hi, tomk!

I have managed to connect the computers.

Problem seemed to be the following: My 'packardbell' has both a wired connection to the router, and a wireless. I had configured the router to give both interfaces the same IP. It seems like this caused the router to send out a different static IP to my wifi interface.

I understand it must be frustrating to give advice to complete n00bs like me, and for me it is a problem as well, running the risk of getting less help because I come across as a lazy non-rtfm bastard. Problem is, I know nothing about networking and computers, but decided to start learning before the weekend, so I would never have thought of using "ping" just by searching for ssh. I guess I just miss too much of a basic understanding, but hopefully I can pick it up.

I have a few questions more, if anybody feel like replying (I might not understand it wink )
First: now I am connecting to another desktop called packardbell from my laptop 'archcomputer'- what if BOTH computers were called 'archcomputer'?
Second; I can ssh into my desktop now, both using wireless and wired connection. However, using the wired connection, I can't get into the internet? WTF?
Third: packardbell's wired connection gets the same IP as my wifi, according to ifconfig -a. Why do my interfaces only get the same IP when my router isn't told to set a static address on them both?

Last edited by Reploid (2008-05-13 10:14:24)

Offline

#16 2008-05-13 11:07:04

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,899
Website

Re: Surfing the contents of my desktop from my laptop

I would name one archcomputer-laptop the other archcomputer-desktop just to set them apart

As for the noob thing well I had to learn linux and the only way I could do that was to ask questions, most of my linux experience has come from using Arch Linux and Arch Linux users..


Mr Green

Offline

#17 2008-05-13 17:22:50

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Surfing the contents of my desktop from my laptop

If you have a choice of wired or wireless for any machine, use wired. Use wireless when you need to be... well, wire-less. smile Don't use two connections on one machine unless you have a specific reason to do so, and you know what you are doing.

If you know nothing about networking, jumping straight into ssh is brave (there may be other suitable words also tongue ). Typical Arch wiki articles assume basic knowledge as a prerequisite e.g. when the ssh page says "SSH is a network protocol" it is assumed that basic network connectivity is available before SSH configuration is attempted.

Offline

Board footer

Powered by FluxBB