LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-07-2017, 02:57 PM   #1
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 435

Rep: Reputation: 28
14.2: ssh fails to connect to desktop on two of three portables


Context: My desktop and three portables are running 14.2: two are 32-bit, two are 64-bit; two are upgrades, two are new installations on virgin SSDs. The hosts are: desktop (name: salmo, 32-bit upgrade), Dell Latitude E5410 (name: caddis, 64-bit, new installation), Dell Latitude 2100 (name: lemna, 32-bit, new installation), Lenovo ThinkPad X200 (name: typha, 64-bit, upgrade).

The Dell E5410 (caddis) and the desktop connect via ssh in both directions. The Dell 2100 (lemna) and the ThinkPad (typha) fail with 'cannot connect file or service unknown.' No pattern with distribution version or new vs upgraded installation.

A professional network admin has been helping me try to figure this out, but we're both out of ideas. He provided the ssh_config and sshd_config files that function on the large network in his care. They make no difference here; yet both configuration files follow the ssh configuration man pages. Will provide copies (with port number redacted) upon request.

I would like idea how to test to find the reason typha and lemna cannot connect to salmo via ssh. Adding verbosity to the output (-vv) provides no insights.
 
Old 09-07-2017, 05:09 PM   #2
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 234Reputation: 234Reputation: 234
Two things (that I can think of) can be blocking access:

1. Firewall rules
2. Hosts access

I had a similar situation once where I was able to ssh to my server from different computers (all on the same lan), except from my laptop. Turned out I forgot to add the laptop's name (or ip) to the server's /etc/hosts.allow.
 
Old 09-07-2017, 05:13 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
If you are unwilling to share any information apart from "it does not work, help" you will not get meaningful answers. I will say this only once, and my advice is valid for the plethora of similar posts youdump onto this forum.
 
1 members found this post helpful.
Old 09-07-2017, 06:15 PM   #4
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Alien Bob View Post
If you are unwilling to share any information apart from "it does not work, help" you will not get meaningful answers. I will say this only once, and my advice is valid for the plethora of similar posts youdump onto this forum.
That's somewhat unfair.

The OP asked
Quote:
I would like idea how to test to find the reason typha and lemna cannot connect to salmo via ssh.
That's a different question from "how to do I fix this?"
 
Old 09-07-2017, 06:18 PM   #5
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Can your two servers resolve the hostname of salmo? This may be a name lookup error versus an ssh one.
 
Old 09-07-2017, 10:49 PM   #6
MadMaverick9
Member
 
Registered: Aug 2010
Posts: 353
Blog Entries: 4

Rep: Reputation: Disabled
@Richard Cranium - if you do not understand why Alien Bob said what he said, then you haven't been paying attention to what's been going on here lately.

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

https://duckduckgo.com/?q=linux+netw...&kn=1&kl=us-en

http://www.linuxhomenetworking.com/w...k_Connectivity

http://www.linuxhomenetworking.com/w...k_Connectivity

All the tools are available in Slackware/Linux. Learn how to use em.

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

@rshepard - It's too bad that you don't have somebody in your life who tells you the following:
Quote:
Originally Posted by Josh_T
Now, I'm not gonna sit here and blow sunshine up your ass, dude. A good sysadmin is compelled to always evaluate what's happened. So he can apply what he's learnt. It's your option, dude, all yours.
Josh_T told me more than twenty years ago to learn to find my own answers instead of waiting to be spoon fed - and he was less polite and used more colourful metaphors.

Read, try, play, learn, make mistakes and ... start from beginning until success. An endless loop. Do it yourself. This is how you will learn and more importantly ... Remember.

Read manuals, books. Not 140-character twitter/facebook messages.

And by play I mean "do with purpose", not "click mindlessly". And be aware of what you're doing/playing ... So that you can always back out and start over.

https://torrentfreak.com/pirate-site...ervice-170803/
Quote:
Rather less complimentary was the operator of a large public site. He told us that two decades ago relationships between operators and users were good but have been getting worse ever since.

“Users of pirate content 20 years ago were highly technical. 10 years ago they were somewhat technical. Right now they are fucking watermelon head puppets. They are plain stupid,” he said.
Quote:
Originally Posted by Gordie
... I was able to use DuckDuckGo to find the answer and applied it. You can do it too or you can wait to be spoon fed. Your choice.
Only then will you be able to move beyond where you are now.

Last edited by MadMaverick9; 09-07-2017 at 11:51 PM.
 
Old 09-09-2017, 10:44 AM   #7
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 435

Original Poster
Rep: Reputation: 28
More information:

The server and three portables have the same content in /etc/hosts,
/etc/hosts.allow, /etc/hosts.equiv, /etc/ssh/ssh_config, and
/etc/ssh/sshd_config.

The server has the public key for each portable in ~/.ssh/authorized_hosts.
Each portable has the server's public key in ~/.ssh/authorized_keys.

The server and each portable can ping each other in both directions.

Output from failed connection attempts follow (port number redacted).

# Dell Latitude 2100 (hostname: lemna):
$ ssh -vv salmo:
OpenSSH_7.4p1, OpenSSL 1.0.2k 26 Jan 2017
debug1: Reading configuration data /home/rshepard/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolving "salmo:" port nnnnn
ssh: Could not resolve hostname salmo:: Name or service not known

# Lenovo ThinkPad X200 (hostname: typha):
$ ssh -vv salmo
OpenSSH_7.4p1, OpenSSL 1.0.2k 26 Jan 2017
debug1: Reading configuration data /home/rshepard/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolving "salmo" port nnnnn
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to salmo [127.0.0.1] port .
debug1: Connection established.
debug1: identity file /home/rshepard/.ssh/id_ed25519 type 4
debug1: key_load_public: No such file or directory
debug1: identity file /home/rshepard/.ssh/id_ed25519-cert type -1
debug1: identity file /home/rshepard/.ssh/id_ed25519 type 4
debug1: key_load_public: No such file or directory
debug1: identity file /home/rshepard/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to salmo:nnnnn as 'rshepard'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: ssh-ed25519-cert-v01@openssh.com,ssh...01@openssh.com,ssh-rsa
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes256...cm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes256...cm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
debug2: MACs ctos: hmac-sha2-512-etm@openssh.com,hmac-s...28@openssh.com
debug2: MACs stoc: hmac-sha2-512-etm@openssh.com,hmac-s...28@openssh.com
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
debug2: host key algorithms: ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128...cm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128...cm@openssh.com
debug2: MACs ctos: hmac-sha2-512-etm@openssh.com,hmac-s...28@openssh.com
debug2: MACs stoc: hmac-sha2-512-etm@openssh.com,hmac-s...28@openssh.com
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-ed25519 SHA256:TxTmpZon4vcLvmH7kapzGfcjTN52KfiEC0oqrkWIbJc
debug1: Host '[salmo]:14982' is known and matches the ED25519 host key.
debug1: Found key in /home/rshepard/.ssh/known_hosts:1
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug2: key: /home/rshepard/.ssh/id_ed25519 (0x55c48d952ac0), explicit
debug2: key: /home/rshepard/.ssh/id_ed25519 (0x55c48d953f00)
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering ED25519 public key: /home/rshepard/.ssh/id_ed25519
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey
debug1: Offering ED25519 public key: /home/rshepard/.ssh/id_ed25519
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey).

The first thing I did was to search the web for these errors and checked
solutions offered to others who had the same issues. Those proffered answers
did not apply to my situation.

I would like advice on what to check, or what tests to run, so I can
identify why these two portables cannot connect to the desktop via ssh when
the third portable can.
 
Old 09-09-2017, 11:22 AM   #8
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,670

Rep: Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786
Do you have a spesific /etc/hosts ?
 
Old 09-09-2017, 11:38 AM   #9
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 435

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by willysr View Post
Do you have a spesific /etc/hosts ?
Willy,

Yes. In my small network I use static IP adresses:

127.0.0.1 localhost salmo.appl-ecosys.com salmo
192.168.55.1 salmo.appl-ecosys.com salmo mail # desktop server
192.168.55.2 caddis.appl-ecosys.com caddis # Dell E5410
192.168.55.3 lemna.appl-ecosys.com lemna # Dell 2100
192.168.55.4 router1.appl-ecosys.com router1 # Netgear FVS-318
192.168.55.5 pachy.appl-ecosys.com pachy # Sony Vaio
192.168.55.6 typha.appl-ecosys.com typha # ThinkPad X200
192.168.55.7 baetis.appl-ecosys.com baetis # Dell OptiPlex 360
192.168.55.8 physa.appl-ecosys.com physa # homebuilt workstation
192.168.55.192 lj5.appl-ecosys.com lj5
192.168.55.194 colorp.appl-ecosys.com colorp
192.168.55.200 wap.appl-ecosys.com wap
# End of hosts.
 
Old 09-09-2017, 11:42 AM   #10
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
Quote:
Originally Posted by rshepard View Post
# Dell Latitude 2100 (hostname: lemna):
$ ssh -vv salmo:
OpenSSH_7.4p1, OpenSSL 1.0.2k 26 Jan 2017
debug1: Reading configuration data /home/rshepard/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolving "salmo:" port nnnnn
ssh: Could not resolve hostname salmo:: Name or service not known
Well, you've got a ":" on the end of the hostname on your ssh command that shouldn't be there. Compare it to this one that works:

Quote:
Originally Posted by rshepard View Post
# Lenovo ThinkPad X200 (hostname: typha):
$ ssh -vv salmo
OpenSSH_7.4p1, OpenSSL 1.0.2k 26 Jan 2017
debug1: Reading configuration data /home/rshepard/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolving "salmo" port nnnnn
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to salmo [127.0.0.1] port .
debug1: Connection established.
debug1: identity file /home/rshepard/.ssh/id_ed25519 type 4
debug1: key_load_public: No such file or directory
debug1: identity file /home/rshepard/.ssh/id_ed25519-cert type -1
[...]
Are you typing that ":" ? Don't. Or is it coming from one of the config files? Have you md5summed the config files on all the systems, to be *absolutely* *certain* that they are all the same? Because that ":" is coming from somewhere...

And furthermore, does "typha" really think that "salmo" is 127.0.0.1 ???? is this coming from typha's /etc/hosts? Because that would be very, very, very wrong.

Last edited by 55020; 09-09-2017 at 11:47 AM. Reason: wtf?
 
Old 09-09-2017, 11:50 AM   #11
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,670

Rep: Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786
Quote:
Originally Posted by rshepard View Post
Willy,

Yes. In my small network I use static IP adresses:

127.0.0.1 localhost salmo.appl-ecosys.com salmo
192.168.55.1 salmo.appl-ecosys.com salmo mail # desktop server
192.168.55.2 caddis.appl-ecosys.com caddis # Dell E5410
192.168.55.3 lemna.appl-ecosys.com lemna # Dell 2100
192.168.55.4 router1.appl-ecosys.com router1 # Netgear FVS-318
192.168.55.5 pachy.appl-ecosys.com pachy # Sony Vaio
192.168.55.6 typha.appl-ecosys.com typha # ThinkPad X200
192.168.55.7 baetis.appl-ecosys.com baetis # Dell OptiPlex 360
192.168.55.8 physa.appl-ecosys.com physa # homebuilt workstation
192.168.55.192 lj5.appl-ecosys.com lj5
192.168.55.194 colorp.appl-ecosys.com colorp
192.168.55.200 wap.appl-ecosys.com wap
# End of hosts.
do you use the same content for all of your machines?
 
Old 09-09-2017, 12:06 PM   #12
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Check the server logs for any sshd related errors. For instance, the server can complain about too insecure permissions of your ~/.ssh directory and/or files.
 
Old 09-09-2017, 04:33 PM   #13
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by MadMaverick9 View Post
@Richard Cranium - if you do not understand why Alien Bob said what he said, then you haven't been paying attention to what's been going on here lately.
Thank you for telling me what I do or do not know.

How much do you get paid to be a mindreader? Is it lucrative?
 
1 members found this post helpful.
Old 09-10-2017, 12:33 AM   #14
MadMaverick9
Member
 
Registered: Aug 2010
Posts: 353
Blog Entries: 4

Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium
Thank you for telling me what I do or do not know. ...
You're welcome.
Quote:
Originally Posted by Richard Cranium
... How much do you get paid to be a mindreader? ...
Not enough.
Quote:
Originally Posted by Richard Cranium
... Is it lucrative?
No.

Because I can only charge you half price, since there's so little to read.

I'm out! Bye LQ!
 
Old 09-10-2017, 04:20 PM   #15
rshepard
Member
 
Registered: Oct 2007
Location: Troutdale, Oregon
Distribution: Slackware
Posts: 435

Original Poster
Rep: Reputation: 28
Found and fixed the problem! For some reason the server's key was stale in each portable's ~/.ssh/known_hosts file. The server's key has not changed for a very long time so it did not occur to me that this is what the various error messages reflected.

On each portable I emptied ~/.ssh/known_hosts, then entered then entered the command $ ssh salmo. The server was not recognized and I was asked if I wanted to connect there anyway; I answered 'yes' and was asked for my passphrase. When that was correctly entered I was connected to salmo.

Thank you all for your comments. I always learn something new and valuable.

Rich
 
  


Reply

Tags
14.2, ssh access



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
[SOLVED] Ethernet Issues on Portables rshepard Linux - Networking 2 08-25-2013 11:59 AM
Passwordless ssh works. Normal login/ssh Fails. gurunarayanan Linux - Newbie 9 11-08-2012 04:42 AM
ssh fails with error with "ld.so.1: ./ssh: fatal: libkrb5.so.3: open failed: pkgutil slufoot80 Linux - Software 6 08-24-2012 02:31 PM
"sudo -u user ssh server" fails to connect oudoubah Linux - Security 3 06-21-2007 06:45 AM
"su root" fails when I connect with normal user thru SSH AlinFaur Linux - Security 5 02-22-2006 11:26 PM

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

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