LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-29-2015, 11:58 AM   #1
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,636

Rep: Reputation: Disabled
Hosts not accepted (in dolphin network panel)


I'm new to networking.

I try to connect my pc and my netbook. Edited /etc/hosts on both machines adding identical lines like this

Code:
...
192.198.2.100  PC       PC
192.168.2.101  netbook  netbook
...
On the PC dolphin shows in the tab "places / network" an entry "netbook". Clicking on that it tries to connect with an address like this

Code:
sftp://me@192.168.2.101:22/home/me/
Where does it get the "/home/me/ part from? Or the "me@" by the way?
Why not sftp://me:password...
I read that the sftp port should be 115 (not the 22 of ftp) by the way...

Part two of my woes follows right here:
On the netbook dolphin shows in the tab "places / network" no entry "PC" at all, even after a reboot. Doesn't /etc/hosts get read? What the... Why? What is going on?

I looked at the firewalls, both machines have identical (default) settings.

I'm aware that alls this has (a) perfectly simple reason(s) but I simply can't figure it (them) out. Grrrr.

Last edited by JZL240I-U; 04-29-2015 at 11:59 AM.
 
Old 04-29-2015, 01:33 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,916

Rep: Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988
sftp runs over ssh which uses 22 as its default port and ftp uses port 21. Simple file transfer protocol uses port 115 which is not the same thing as sftp. The purpose of the hosts file is basically a manual way to resolve host names to IP addresses.

I assume by connect you want to share files between the two computers. The typical methods / protocols used are nfs, sftp and samba i.e CIFS/SMB (windows networking). Those desired services must be running on your PCs as well as the firewall allowing access to those ports. If samba or windows PCs are not running then network places will be empty.
 
Old 04-30-2015, 02:08 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,636

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
sftp runs over ssh which uses 22 as its default port and ftp uses port 21. Simple file transfer protocol uses port 115 which is not the same thing as sftp.
Confusing... What does "sftp" stand for, then?
Quote:
Originally Posted by michaelk View Post
The purpose of the hosts file is basically a manual way to resolve host names to IP addresses.
I know, but why is "netbook" known to "PC" but not vice versa with identical hosts files?
Quote:
Originally Posted by michaelk View Post
I assume by connect you want to share files between the two computers. The typical methods / protocols used are nfs, sftp and samba i.e CIFS/SMB (windows networking). Those desired services must be running on your PCs as well as the firewall allowing access to those ports. If samba or windows PCs are not running then network places will be empty.
I have not real network, just two computers and a cable, nothing sophisticated is called for.

On "PC" everything seems to be fine, dolphin tries to connect -- with a timeout. The address / URI "sftp://me@192.168.2.101:22/home/me/" is correct, as far as I can see.

Can you please have a look at the questions after the second [CODE] block in my original post, perhaps you know some answers there -- thanks in advance .

Last edited by JZL240I-U; 04-30-2015 at 06:59 AM.
 
Old 04-30-2015, 05:45 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,916

Rep: Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988
sftp - secure file transfer protocol. "sftp://me@192.168.2.101:22/home/me/" a timeout would indicate that either ssh is not running or the firewall is not configured to allow ssh traffic or ssh is configured to run on a different port (not 22) on the laptop. The syntax for a sftp connection is username@hostort/path. I don't know why you have already have a saved shortcut unless you unknowingly saved it. The file browser uses sftp:// to indicate the protocol/connection type.

As a point of reference the syntax for sftp command line client is
sftp username@hostath (port 22 is the default if different use the -p option)

You have not specified as to what you mean by "connect". As stated in my first post some type of service needs to be running on both computers. Again some of the methods for file sharing is samba, nfs or sftp. The network in the file browser is typically for windows / samba shares. The other protocols are not "browseable"
 
Old 05-06-2015, 01:35 AM   #5
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,636

Original Poster
Rep: Reputation: Disabled
Hello michaelk, sorry to be back only this late, but I was out of town for a few days and then my connection was down due to bad weather...

Quote:
Originally Posted by michaelk View Post
sftp - secure file transfer protocol. "sftp://me@192.168.2.101:22/home/me/" a timeout would indicate that either ssh is not running or the firewall is not configured to allow ssh traffic or ssh is configured to run on a different port (not 22) on the laptop.
I checked: sshd is running, ports are open on 22. So that is not the reason.

Quote:
Originally Posted by michaelk View Post
The syntax for a sftp connection is username@hostort/path. I don't know why you have already have a saved shortcut unless you unknowingly saved it. The file browser uses sftp:// to indicate the protocol/connection type.
I found out, it is from the olden times when I used openSUSE 12.3. Then it worked *sigh*.

Quote:
Originally Posted by michaelk View Post
As a point of reference the syntax for sftp command line client is
sftp username@hostath (port 22 is the default if different use the -p option)
No password required?

Quote:
Originally Posted by michaelk View Post
You have not specified as to what you mean by "connect". As stated in my first post some type of service needs to be running on both computers. Again some of the methods for file sharing is samba, nfs or sftp. The network in the file browser is typically for windows / samba shares. The other protocols are not "browseable".
I want to do it as described in the openSUSE manual, chapter 27.3 (dolphin section):
http://activedoc.opensuse.org/book/o...rans.crossover

Something in the connection doesn't seem to work, though networkmanager sees it and labels it running/connected. How can I check whether the "connection is established" as demanded in the openSUSE manual?

I have no windows I just want to connect two machines running under openSUSE 13.2 / KDE using a simple cable. All the powerful features of nfs or samba are not really necessary as far as I understand it.

Last edited by JZL240I-U; 05-09-2015 at 08:56 AM.
 
Old 05-06-2015, 06:26 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,916

Rep: Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988
Make sure you can log in using ssh from the command line from each computer.
ssh username@ip_address (password required)

If that works you can try sftp:
sftp username@ip_address

Last edited by michaelk; 05-06-2015 at 06:28 AM.
 
Old 05-06-2015, 10:23 AM   #7
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,636

Original Poster
Rep: Reputation: Disabled
Okay:

Code:
me@PC:~> ssh me@192.168.2.101:22/home/me
ssh: Could not resolve hostname 192.168.2.101:22/home/me: Name or service not known

me@PC:~> ssh me@192.168.2.101
ssh: connect to host 192.168.2.101 port 22: Connection timed out

me@PC:~> cat /etc/hosts
#
# hosts         This file describes a number of hostname-to-address
#               mappings for the TCP/IP subsystem.  It is mostly
#               used at boot time, when no name servers are running.
#               On small systems, this file can be used instead of a
#               "named" name server.
# Syntax:
#    
# IP-Address  Full-Qualified-Hostname  Short-Hostname
#

127.0.0.1       localhost 

# special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback

fe00::0         ipv6-localnet 

ff00::0         ipv6-mcastprefix 
ff02::1         ipv6-allnodes 
ff02::2         ipv6-allrouters 
ff02::3         ipv6-allhosts 

192.168.2.100   PC              PC
192.168.2.101   netbook         netbook

# 0.0.0.0               navigator.web.de
me@PC:~>
So the error is the same as in the GUI, i.e. "timeout" of the connection. Or did I do anything the wrong way?
 
Old 05-06-2015, 02:20 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,916

Rep: Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988
If the computers are connected using just an ethernet cable have you verified that networking is configured correctly?
Can you ping the other computer using the ping command?

ping pc or ping netbook (depending on which computer you type the command).

Look at the output of the ifconfig command, is the ethernet adapter actually assigned an IP address?
 
1 members found this post helpful.
Old 05-08-2015, 11:30 AM   #9
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,636

Original Poster
Rep: Reputation: Disabled
Hmm. Ping:

Code:
me@PC:~> ping 192.168.2.101
connect: Network is unreachable
me@PC:~> ping 192.168.2.101:22
ping: unknown host 192.168.2.101:22
me@PC:~> ping netbook
PING netbook (192.168.2.101) 56(84) bytes of data.
^C {after 3 minutes or so}
--- netbook ping statistics ---
331 packets transmitted, 0 received, 100% packet loss, time 331156ms
me@PC:~>
And here ifconfig:

Code:
PC:/home/me # ifconfig
enp3s0    Link encap:Ethernet  Hardware Adresse 1C:6F:65:31:99:65  
          inet Adresse:169.254.7.42  Bcast:169.254.255.255  Maske:255.255.0.0
          inet6 Adresse: fe80::1e6f:65ff:fe31:9965/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:41 errors:0 dropped:0 overruns:0 frame:0
          TX packets:53 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:1000 
          RX bytes:9194 (8.9 Kb)  TX bytes:9674 (9.4 Kb)

lo        Link encap:Lokale Schleife  
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          inet6 Adresse: ::1/128 Gültigkeitsbereich:Maschine
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:74 errors:0 dropped:0 overruns:0 frame:0
          TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:0 
          RX bytes:5556 (5.4 Kb)  TX bytes:5556 (5.4 Kb)

ppp0      Link encap:Punkt-zu-Punkt Verbindung  
          inet Adresse:10.33.118.53  P-z-P:10.64.64.64  Maske:255.255.255.255
          UP PUNKTZUPUNKT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:1083 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1425 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:3 
          RX bytes:683475 (667.4 Kb)  TX bytes:187980 (183.5 Kb)

PC:/home/me #
So, network unreachable, funny IP-address assigned (by whom?). So I tried that address:

Code:
me@PC:~> ping 169.254.11.166
PING 169.254.11.166 (169.254.11.166) 56(84) bytes of data.
64 bytes from 169.254.11.166: icmp_seq=1 ttl=64 time=1.47 ms
64 bytes from 169.254.11.166: icmp_seq=2 ttl=64 time=0.729 ms
64 bytes from 169.254.11.166: icmp_seq=3 ttl=64 time=0.735 ms
64 bytes from 169.254.11.166: icmp_seq=4 ttl=64 time=0.730 ms
64 bytes from 169.254.11.166: icmp_seq=5 ttl=64 time=0.741 ms
64 bytes from 169.254.11.166: icmp_seq=6 ttl=64 time=0.716 ms
64 bytes from 169.254.11.166: icmp_seq=7 ttl=64 time=0.712 ms
64 bytes from 169.254.11.166: icmp_seq=8 ttl=64 time=0.750 ms
64 bytes from 169.254.11.166: icmp_seq=9 ttl=64 time=0.726 ms
64 bytes from 169.254.11.166: icmp_seq=10 ttl=64 time=0.701 ms
64 bytes from 169.254.11.166: icmp_seq=11 ttl=64 time=0.731 ms
64 bytes from 169.254.11.166: icmp_seq=12 ttl=64 time=0.705 ms
64 bytes from 169.254.11.166: icmp_seq=13 ttl=64 time=0.697 ms
64 bytes from 169.254.11.166: icmp_seq=14 ttl=64 time=0.725 ms
64 bytes from 169.254.11.166: icmp_seq=15 ttl=64 time=0.698 ms
64 bytes from 169.254.11.166: icmp_seq=16 ttl=64 time=0.708 ms
64 bytes from 169.254.11.166: icmp_seq=17 ttl=64 time=0.714 ms
64 bytes from 169.254.11.166: icmp_seq=18 ttl=64 time=0.701 ms
64 bytes from 169.254.11.166: icmp_seq=19 ttl=64 time=0.701 ms
64 bytes from 169.254.11.166: icmp_seq=20 ttl=64 time=0.702 ms
64 bytes from 169.254.11.166: icmp_seq=21 ttl=64 time=0.690 ms
64 bytes from 169.254.11.166: icmp_seq=22 ttl=64 time=0.678 ms
64 bytes from 169.254.11.166: icmp_seq=23 ttl=64 time=0.671 ms
64 bytes from 169.254.11.166: icmp_seq=24 ttl=64 time=0.676 ms
64 bytes from 169.254.11.166: icmp_seq=25 ttl=64 time=0.671 ms
64 bytes from 169.254.11.166: icmp_seq=26 ttl=64 time=0.687 ms
^C                                                                                                                                                     
--- 169.254.11.166 ping statistics ---                                                                                                                 
26 packets transmitted, 26 received, 0% packet loss, time 25001ms                                                                                      
rtt min/avg/max/mdev = 0.671/0.737/1.472/0.149 ms                                                                                                      
me@PC:~>
Umm. Do I use these IPs? Do they change? How are they assigned? Why are the /etc/hosts files ignored?

Btw. the same works on the netbook (with IP 169.254.7.42, which belongs to PC ... *sigh*). What do you suggest now?

<edit> Okay, I tried it. It works after getting rid of a popup, saying that the authenticity of the computer "netbook" could not be established. Yes. Ummm. Bewildering . </edit>

Last edited by JZL240I-U; 05-09-2015 at 06:51 AM.
 
Old 05-08-2015, 12:24 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,916

Rep: Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988Reputation: 5988
The hosts file resolves IP addresses to a name. So when you type in PC in the browser for example it actually uses 192.198.2.100. The hosts file does not configure i.e. assign your network adapters an IP address. How to do that depends on the distribution. You need to assign each PC with a static IP address. The how to depends on the distribution but most have a GUI wizard if running a desktop.

If a computer does not have a permanent IP address i.e static then in most cases they are assigned one automatically via a DHCP server i.e. from a home router or an ISP. When the computer boots up the DHCP client requests an IP address from the server. If a server does not respond then the client has a fail over mode whereby it assigns itself an unused private address in the range 169.254.0.0/16.

So yes you can use the 169.254.x.x addresses but they might change every time the computer is started.
 
Old 05-09-2015, 08:51 AM   #11
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,636

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
...The hosts file does not configure i.e. assign your network adapters an IP address...
Ah, my error.

Quote:
Originally Posted by michaelk View Post
...You need to assign each PC with a static IP address. The how to depends on the distribution but most have a GUI wizard if running a desktop.
OpenSUSE has at least two . In YAST2 the functionality is disabled though. One can do it in networkmanager I think / edit connection / edit / Tab &quot;IP-V4&quot; / manual -> new connection (then enter the IP, netmask and gateway)... but I didn't (see below).

Quote:
Originally Posted by michaelk View Post
...If a computer does not have a permanent IP address i.e. static then in most cases they are assigned one automatically via a DHCP server...
That's no solution here, since this is only two computers and a cable .

Quote:
Originally Posted by michaelk View Post
...If a [DHCP] server does not respond then the client has a fail over mode whereby it assigns itself an unused private address in the range 169.254.0.0/16.

So yes you can use the 169.254.x.x addresses but they might change every time the computer is started.
They don't change. So I'll just use them. I just wish I knew how they were assigned.

Thank you for your help and patience, michaelk I'll mark this thread as solved now.

Last edited by JZL240I-U; 05-13-2015 at 10:53 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
connect to another computer in dolphin/network/samba shares does not logged out? glorsplitz Slackware 3 08-10-2015 02:18 AM
LXer: Krusader Twin-Panel FM: Good Alternative to Dolphin and Konqueror LXer Syndicated Linux News 0 04-13-2014 06:12 PM
KDE Dolphin and Places Panel Woodsman Slackware 4 02-11-2014 06:38 AM
Password(s) accepted for login but not accepted for applications. JZL240I-U Ubuntu 29 02-14-2012 11:53 AM
No network provider accepted the given network path jojunn Red Hat 6 12-23-2009 06:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:43 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