[Solved] Configure ssh and Unison; ssh not working

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

[Solved] Configure ssh and Unison; ssh not working

Postby dpeirce » Tue Apr 02, 2013 3:25 am

I hope this is the correct place to ask this question.

I'm trying to use Unison to sync a directory of files on my two computers here at the house. One is 'laptop-mepis-host' and the other is 'tower-salineos-base'. At one point, I had Unison set up to where it was contacting the laptop from the tower, but it asked for a password and, when I input my password (the one I use to login to that distro - I don't know what other password it could want), it asks for the password again. I tried it with and without a passphrase in the setup of Unison but it still asked for the password.The files I want to sync are in ~/Experiment01 on both machines.

Alternately, I tried ssh from the command line, using '$ ssh dave@laptop-mepis-host'. The tab on Konsole shows '(dave) laptop-mepis-host' but wants the password). I type in my login password, or <return>; it hesitates, says 'permission denied', and then asks for the password again. '$ ssh laptop-mepis-host' results in the konsole freezing for a looong time, and then it asks for the password, freezes, says 'permission denied', and asks for the password again. Oddly, doing this on either machine shows an IP address for the other as 184.106.31.177; however, my local IP addresses are in the 192. range.

Following the instructions given by Bruno at http://www.linuxformat.com/forums/viewt ... h+password, I got to 4(iii): I put in '$ ssh-copy-id dave@laptop-mepis-host' and the reply was 'ssh: connect to host 192.168.1.103 port 22: No route to host'. I transferred the ~/.ssh/id_rsa.pub file to the laptop with a thumb drive, but same results.

Somewhere I'm supposed to put in a password, either to Unison or to ssh. I've read extensive documentation on both Unison and ssh but haven't seen anything else about a password.

Help will be greatly appreciated. Right now I'm using "sneaker net" and it's slooow and tedious.

In faith, Dave
Viva Texas
Last edited by dpeirce on Tue Apr 09, 2013 1:39 am, edited 1 time in total.
dpeirce
 
Posts: 31
Joined: Tue Sep 12, 2006 11:26 pm
Location: Central Texas

Postby Dutch_Master » Tue Apr 02, 2013 5:42 am

First you'd need to resolve the IP address issue. Use ifconfig to find out what address you really have:
Code: Select all
ifconfig -a
This lists all network interfaces, regardless if they are in use or not.

Next, check the config files for erroneous entries specifying a particular IP address. As one machine shows a different range, this is most likely. Unison and ssh are the most likely culprits. Correct the error (DUH :P) ;)

Now, re-try the flowchart from Bruno from where it failed. It should (note: should :P) work :)

PS: this would be most appropriate in the Help section.
Dutch_Master
LXF regular
 
Posts: 2459
Joined: Tue Mar 27, 2007 1:49 am

Postby nelz » Tue Apr 02, 2013 7:26 am

I'd suspect the DNS resolution and a basic network configuration error before trying to blame SSH. Can you ping the machines by hostname? What do you get from

Code: Select all
dig hostname


If you don't have dig available, install the bind-tools package. What are the contents of /etc/hosts and /etc/resolv.conf? Are you using DHCP or static network configuration?
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8546
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby dpeirce » Tue Apr 02, 2013 7:43 pm

I thought covers and disks was an odd place :), but that's where Bruno's thread went so I went there too. Sorry.

Before I get back to Bruno's flowprocess, I wanted to get straight on the DNSs. I'm not understanding what I found out with pings, ifconfig, and dig. Here's the results:

==================================

PINGS:
dave@tower-salineos-base:~$ ping laptop-mepis-host
PING laptop-mepis-host (66.152.109.23) 56(84) bytes of data. (Freezes)

dave@tower-salineos-base:~$ ping 192.168.2.147
PING 192.168.2.147 (192.168.2.147) 56(84) bytes of data.
64 bytes from 192.168.2.147: icmp_req=1 ttl=64 time=0.965 ms
64 bytes from 192.168.2.147: icmp_req=2 ttl=64 time=1.03 ms
etc.....

Laptop to tower-salineos-base contacts laptop, then freezes.
Laptop to 192.168.2.100 contacts tower, then freezes

---------------------------

DIG, FROM TOWER TO LAPTOP:

FIRST TIME:
dave@tower-salineos-base:~$ dig laptop-mepis-host

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> laptop-mepis-host
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30684
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;laptop-mepis-host. IN A

;; ANSWER SECTION:
laptop-mepis-host. 10 IN A 69.16.143.23
laptop-mepis-host. 10 IN A 184.106.31.177
laptop-mepis-host. 10 IN A 66.152.109.23

;; Query time: 2 msec
;; SERVER: 192.168.1.254#53(192.168.1.254)
;; WHEN: Tue Apr 2 12:01:44 2013
;; MSG SIZE rcvd: 134

dave@tower-salineos-base:~$

Second time from tower to laptop, same except different id number.

Dig from laptop to tower exactly the same except for different id number.

---------------------------

I tried dig 192.168.2.147 from the tower, and the results were slightly different than using the hostname:

dave@tower-salineos-base:~$ su
Password:
root@tower-salineos-base:/home/dave# dig 192.168.2.147

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> 192.168.2.147
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7912
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;192.168.2.147. IN A

;; ANSWER SECTION:
192.168.2.147. 86400 IN A 192.168.2.147

;; Query time: 2 msec
;; SERVER: 192.168.1.254#53(192.168.1.254)
;; WHEN: Tue Apr 2 14:35:19 2013
;; MSG SIZE rcvd: 60

root@tower-salineos-base:/home/dave#

--------------------------

DNS numbers (ifconfig -a): Laptop: 192.168.2.147; Tower: 192.168.2.100
(Both are the same after reboot).

================================

As you can see, the pings from tower to laptop freeze when using the hostname but proceed OK when using the DNS number; however, the pings from the laptop to the tower freeze either way. Digs seem to work in both directions with the hostnames, but they varied depending on whether I used the hostname or the DNS number (especially in the ANSWER section.

Also, the DNS numbers from Dig are different from ifconfig, and the server is the router DNS.

You mentioned cleaning up the config files; there are config files in ~/.ssh, /etc/ssh/ssh_config and sshd_config (neither of which seem to have DNSs in them). are there any others? /user/share/ssh contains some blacklists; do I need to worry about them?

In faith, Dave
Viva Texas
dpeirce
 
Posts: 31
Joined: Tue Sep 12, 2006 11:26 pm
Location: Central Texas

Postby nelz » Tue Apr 02, 2013 10:16 pm

Something is really screwy here, a DNS lookup on laptop-mepis-host returns three IP addresses, none of them correct. No wonder even pings are not working. Don't even think about touching your SSH configs, you need to get the network setup sorted first (the SSH settings may well be fine).

I take it 192.168.1.254 is your router? Is this also your DHCP server or have you set up the networks statically? I ask because your router is on a different subnet from the IP addresses you say the computers should have - 192.168.1.0 vs 192.168.2.0.

That is the first thing you need to sort out, and the simplest way to do so is to set both computers to use dynamic addressing.

Do you have any entries for either computer in /etc/hosts?

What does ifconfig return?
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8546
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby dpeirce » Tue Apr 02, 2013 11:16 pm

Re hosts files, Yes. Hosts.allow is
'sshd : 127.0.0.1 : allow
sshd : 192.168. : allow "

And Hosts.deny is
'sshd : ALL : deny'

Don't remember now where I got that.

I discover my router is not accessible; my password isn't working. My friend who set it up in the beginning, and knows far more about this stuff than I do, is coming by tomorrow at 0900; I remember setting the DNSs for my computers, and wrote them down, and still have the paper for the laptop... and it shows 192.168.1.103. Best I remember, I set the tower then at either .104 or .102; I've tried pinging both, and both show 'Destination unreachable". I'll be back on when we get the router open and look.

DNS numbers (ifconfig -a): Laptop: 192.168.2.147; Tower: 192.168.2.100
(Both are the same after reboot).

I appreciate your patience. I'm in waaay over my head here; this is the first time I've fooled with network stuff. So the help is badly needed.

In faith, Dave
Viva Texas
dpeirce
 
Posts: 31
Joined: Tue Sep 12, 2006 11:26 pm
Location: Central Texas

Postby nelz » Tue Apr 02, 2013 11:23 pm

Note hosts.{allow,deny{ just plain /etc/hosts.

Look in whatever network configuration tool your distro uses and check whether it is set to automatic/dynamic configuration or whether addresses are specified manually. I suspect it is set manually, with addresses that clash with your router's setup.

Set things to fully automatic and reboot, after which your problems may magically go away.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8546
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby dpeirce » Wed Apr 03, 2013 4:09 am

Laptop: Network Connection is set to connect wireless automatically, with basic settings using DHCP.

Tower: Network Connection is set to connect wired ethernet automatically, basic settings, DHCP.

/etc/hosts says:
Tower:
127.0.0.1 localhost
127.0.0.1 tower-salineos-base

Laptop:
127.0.0.1 localhost.localdomain localhost
127.0.0.1 laptop-mepis-host
127.0.0.1 laptop-mepis-host.local

# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


Laptop /etc/hosts.allow has no entries.
Laptop /etc/hosts.deny says: ALL: 186.87.69.249
Tower hosts.allow and hosts.deny reported in previous.

In faith, Dave
Viva Texas
dpeirce
 
Posts: 31
Joined: Tue Sep 12, 2006 11:26 pm
Location: Central Texas

Postby dpeirce » Fri Apr 05, 2013 3:20 am

My apologies for not getting back to the thread today: My friend who was going to help me came down with some kind of walking dead head pneumonia or really bad allergies or something, and won't be here until Saturday. He can hack into my router and set me up so I can access it again; I'm hopeless until he gets here. So, sorry about the delay.

In faith, Dave
Viva Texas
dpeirce
 
Posts: 31
Joined: Tue Sep 12, 2006 11:26 pm
Location: Central Texas

Postby dpeirce » Sun Apr 07, 2013 3:42 am

My friend finally was able to come. He repaired the router settings and, in the process discovered an intruder in my network (I thought I lived far enough out in the country as to not need security; wrong!). The cleanup, and expelling the intruder, settled things down and Unison now works from the Tower to the Laptop, and in both directions, so I'm in business. However, neither Unison not ssh work from the laptop to the tower. With ssh, there's an error: "ssh: connect to host tower port 22: Connection refused". And the dig results (especially the weird 'Authorities' entries) seem to indicate there's still a problem in my network.

I looked in KDE Info Center, and port 22 isn't mentioned in either machine. ssh.config and sshd.config both show port 22 enabled in both machines. Each hosts file shows the localhost and the ip number for the other machine. I have only one firewall package, ufw, in both machines; #ufw status verbose in either machine shows "Inactive". Google and I are both out of ideas.

I've included the ifconfig, ssh, and dig outputs from both machines in hopes that knowledgeable eyes will see something and someone can point me toward resolution of the port 22 issue and the strange entries in dig's Authorities.

Code: Select all

Ifconfig on laptop:
[root@laptop-mepis-host dave]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:18:f3:a0:22:a9
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:18 Base address:0x2c00

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8199 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8199 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5755735 (5.4 MiB)  TX bytes:5755735 (5.4 MiB)

wlan0     Link encap:Ethernet  HWaddr 00:19:d2:5f:45:af
          inet addr:192.168.2.152  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23083 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12195 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8515191 (8.1 MiB)  TX bytes:1387431 (1.3 MiB)

[root@laptop-mepis-host dave]#

ifconfig on tower:
dave@tower-host-mepis:~$ su
Password:
[root@tower-host-mepis dave]# ifconfig
eth0      Link encap:Ethernet  HWaddr e0:69:95:c2:d0:4a
          inet addr:192.168.2.151  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:36890 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20697 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:38522178 (36.7 MiB)  TX bytes:1728357 (1.6 MiB)
          Interrupt:20 Memory:f7200000-f7220000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:9070 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9070 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8930641 (8.5 MiB)  TX bytes:8930641 (8.5 MiB)

[root@tower-host-mepis dave]#

------------------------------------------------------------------

ssh laptop to tower:
dave@laptop-mepis-host:~$ ssh tower
ssh: connect to host tower port 22: Connection refused
dave@laptop-mepis-host:~$

ssh laptop to tower ip number:
dave@laptop-mepis-host:~$ ssh 192.168.2.151
ssh: connect to host 192.168.2.151 port 22: Connection refused
dave@laptop-mepis-host:~$

ssh tower to laptop:
dave@tower-host-mepis:~$ ssh laptop
Password:
Linux laptop-mepis-host 2.6.36-1-mepis-smp #1 SMP Thu Mar 31 17:07:18 CDT 2011 i686

The exact distribution terms for each program included with MEPIS Linux is described in the
individual files in /usr/share/doc/*/copyright.

MEPIS Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
No mail.
dave@laptop-mepis-host:~$

ssh tower to laptop ip number:
dave@laptop-mepis-host:~$ ssh 192.168.2.152
Password:
Linux laptop-mepis-host 2.6.36-1-mepis-smp #1 SMP Thu Mar 31 17:07:18 CDT 2011 i686

The exact distribution terms for each program included with MEPIS Linux is described in the
individual files in /usr/share/doc/*/copyright.

MEPIS Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
No mail.
dave@laptop-mepis-host:~$

----------------------------------------------------------

dig laptop to tower:
dave@laptop-mepis-host:~$ dig tower

; <<>> DiG 9.7.3 <<>> tower
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58225
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;tower.                         IN      A

;; ANSWER SECTION:
tower.                  10      IN      A       66.152.109.23
tower.                  10      IN      A       69.16.143.23
tower.                  10      IN      A       184.106.31.177

;; Query time: 2 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Apr  6 16:07:13 2013
;; MSG SIZE  rcvd: 86

dave@laptop-mepis-host:~$

dig laptop to tower ip number:
dave@laptop-mepis-host:~$ dig 192.168.2.151

; <<>> DiG 9.7.3 <<>> 192.168.2.151
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24546
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;192.168.2.151.                 IN      A

;; ANSWER SECTION:
192.168.2.151.          86400   IN      A       192.168.2.151

;; Query time: 52 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Apr  6 20:06:23 2013
;; MSG SIZE  rcvd: 60

dave@laptop-mepis-host:~$

dig laptop to laptop:
dave@laptop-mepis-host:~$ dig laptop

; <<>> DiG 9.7.3 <<>> laptop
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31087
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;laptop.                                IN      A

;; ANSWER SECTION:
laptop.                 10      IN      A       184.106.31.177
laptop.                 10      IN      A       66.152.109.23
laptop.                 10      IN      A       69.16.143.23

;; Query time: 3 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Apr  6 16:09:00 2013
;; MSG SIZE  rcvd: 90

dave@laptop-mepis-host:~$

dig laptop to laptop ip number
dave@laptop-mepis-host:~$ dig 192.168.2.152

; <<>> DiG 9.7.3 <<>> 192.168.2.152
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39132
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;192.168.2.152.                 IN      A

;; ANSWER SECTION:
192.168.2.152.          86400   IN      A       192.168.2.152

;; Query time: 50 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Apr  6 20:21:08 2013
;; MSG SIZE  rcvd: 60

dave@laptop-mepis-host:~$

------------------------------------------------------------

dig tower to laptop
dave@tower-host-mepis:~$ dig tower to laptop    <-- A mistake, but produced
                                                    weird authorities. ???
; <<>> DiG 9.7.3 <<>> tower to laptop
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46546
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;tower.                         IN      A

;; ANSWER SECTION:
tower.                  10      IN      A       184.106.31.177
tower.                  10      IN      A       66.152.109.23
tower.                  10      IN      A       69.16.143.23

;; Query time: 48 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Apr  6 20:25:57 2013
;; MSG SIZE  rcvd: 86

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32658
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 6

;; QUESTION SECTION:
;to.                            IN      A

;; ANSWER SECTION:
to.                     84592   IN      A       216.74.32.107

;; AUTHORITY SECTION:  <-- WHAT ARE THESE?????
to.                     67248   IN      NS      to.cctld.authdns.ripe.net.   
to.                     67248   IN      NS      ns1.iafrica.com.             
to.                     67248   IN      NS      colo.to.                     
to.                     67248   IN      NS      auth02.ns.uu.net.             
to.                     67248   IN      NS      tonic.to.

;; ADDITIONAL SECTION:  <-- AND THESE????
to.cctld.authdns.ripe.net. 55835 IN     A       193.0.9.118                   :
to.cctld.authdns.ripe.net. 166817 IN    AAAA    2001:67c:e0::118              :
ns1.iafrica.com.        14209   IN      A       196.7.0.139                   :
colo.to.                170808  IN      A       216.74.32.104                 :
tonic.to.               8202    IN      A       216.74.32.100                 :
auth02.ns.uu.net.       81240   IN      A       198.6.1.82                    :

;; Query time: 2 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Apr  6 20:25:57 2013
;; MSG SIZE  rcvd: 278

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48547
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;laptop.                                IN      A

;; ANSWER SECTION:
laptop.                 10      IN      A       69.16.143.23
laptop.                 10      IN      A       184.106.31.177
laptop.                 10      IN      A       66.152.109.23

;; Query time: 2 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Apr  6 20:25:57 2013
;; MSG SIZE  rcvd: 90

dave@tower-host-mepis:~$

dig tower to laptop:
dave@tower-host-mepis:~$ dig laptop

; <<>> DiG 9.7.3 <<>> laptop
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35394
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;laptop.                                IN      A

;; ANSWER SECTION:
laptop.                 10      IN      A       184.106.31.177
laptop.                 10      IN      A       66.152.109.23
laptop.                 10      IN      A       69.16.143.23

;; Query time: 49 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Apr  6 20:41:24 2013
;; MSG SIZE  rcvd: 90

dave@tower-host-mepis:~$

dig tower to laptop ip number:
dave@tower-host-mepis:~$ dig 192.168.2.152

; <<>> DiG 9.7.3 <<>> 192.168.2.152
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48603
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;192.168.2.152.                 IN      A

;; ANSWER SECTION:
192.168.2.152.          86400   IN      A       192.168.2.152

;; Query time: 49 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Apr  6 20:37:09 2013
;; MSG SIZE  rcvd: 60

dave@tower-host-mepis:~$

dig tower to tower:
dave@tower-host-mepis:~$ dig tower

; <<>> DiG 9.7.3 <<>> tower
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18518
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;tower.                         IN      A

;; ANSWER SECTION:
tower.                  10      IN      A       66.152.109.23
tower.                  10      IN      A       69.16.143.23
tower.                  10      IN      A       184.106.31.177

;; Query time: 50 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Apr  6 20:48:16 2013
;; MSG SIZE  rcvd: 86

dave@tower-host-mepis:~$

dig tower to tower ip number:
dave@tower-host-mepis:~$ dig 192.168.2.151

; <<>> DiG 9.7.3 <<>> 192.168.2.151
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21314
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;192.168.2.151.                 IN      A

;; ANSWER SECTION:
192.168.2.151.          86400   IN      A       192.168.2.151

;; Query time: 2 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sat Apr  6 20:49:58 2013
;; MSG SIZE  rcvd: 60

dave@tower-host-mepis:~$


Again, your patience and help are greatly appreciated. Thanks.

In faith, Dave
Viva Texas

Registered Linux user #417229
Code: Select all
Code: Select all
dpeirce
 
Posts: 31
Joined: Tue Sep 12, 2006 11:26 pm
Location: Central Texas

Postby dpeirce » Sun Apr 07, 2013 5:33 am

More:

Continuing my search on ask dot com with new search terms, I found this: "/sbin/iptables -A INPUT -m state --state NEW -p tcp --dport 22 -j ACCEPT". It was supposed to open port 22. I've run this command on both machines, with no difference in either; ssh tower to laptop works fine, laptop to tower gets the 'Refused connection" error.

I found a reference to nmap, and installed it on both machines. Using # nmap -v -sT localhost, I find that port 22 is open on the laptop but isn't mentioned on the tower. Next I found and tried # /sbin/iptables -A INPUT -s 192.168.2.152 -j ACCEPT. This supposedly would open port 22 for the laptop's ip number. Ssh from the laptop to the tower still doesn't work.

In faith, Dave
Viva Texas

Registered Linux user #417229
dpeirce
 
Posts: 31
Joined: Tue Sep 12, 2006 11:26 pm
Location: Central Texas

Postby nelz » Sun Apr 07, 2013 8:19 am

Ging for the low hanging fruit first, is the SSH service running on the tower?
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8546
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby dpeirce » Sun Apr 07, 2013 8:40 pm

Judging from the ssh outputs above (right under the ifconfig outputs), ssh is running on both the tower and the laptop. The tower can connect with the laptop, and I get a terminal from the laptop which appears in a bash window on the tower desktop. Ssh on the laptop appears to contact the tower but then the tower refuses connection.

In faith, Dave
Viva Texas

May all your Christmases be #ffffff!
dpeirce
 
Posts: 31
Joined: Tue Sep 12, 2006 11:26 pm
Location: Central Texas

Postby Rhakios » Sun Apr 07, 2013 9:09 pm

dpeirce wrote:Judging from the ssh outputs above (right under the ifconfig outputs), ssh is running on both the tower and the laptop.


Not from what I can see, ssh consists of two parts, a client and a server, the client is installed by default on almost all distros I've ever tried, the server often isn't. ps is your friend here, if you use it on the tower, you should see something like this:

Code: Select all
rhakios@pythia:~$ ps aux | grep ssh
root       930  0.0  0.0  49972  2452 ?        Ss   Apr05   0:00 /usr/sbin/sshd -D


if the server is installed and running.
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Postby dpeirce » Sun Apr 07, 2013 9:38 pm

This is the output::

Code: Select all
dave@tower-host-mepis:~$ ps aux | grep ssh
dave      2235  0.0  0.0  11928   304 ?        Ss   Apr06   0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager
dave      7594  0.0  0.0  38564  2696 pts/2    Ss+  Apr06   0:00 ssh laptop -e none unison -server
dave     17592  0.0  0.0  29896   852 pts/0    S+   16:31   0:00 grep ssh
dave@tower-host-mepis:~$


In faith, Dave
Viva Texas
dpeirce
 
Posts: 31
Joined: Tue Sep 12, 2006 11:26 pm
Location: Central Texas

Next

Return to Help!

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests