LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-09-2009, 08:11 PM   #1
billlee
Member
 
Registered: Jun 2003
Location: East Texas
Distribution: Fedora (24)
Posts: 47

Rep: Reputation: 16
Question Execute commands via ssh - working and failing


Environment:
Desktop - Fedora 10

Laptop1 - Fedora 8 (named epsilon)

Laptop2 - Fedora 10 (named delta)

I am trying to get F10 installed on L2 so that I can use the system the same way that I have been using L1 with F8. Specifically, I am using unison (with ssh) to crossload files between the desktop and the laptop. Unison works just fine when executed on the desktop crossloading to the F8 Laptop1. But when trying to do the same on L2, it hangs while trying to contact the server.

Attempting to diagnose the problem has led me to ssh.

I can use ssh to login to any of my systems from the desktop. E.g.,
ssh delta

but attempting to execute a command via ssh simply hangs. E.g.,
ssh delta "echo $PATH"

Both ssh login and ssh remote execution work fine when done to the F8 laptop 1.

I have installed tcsh on all systems and my login shell is csh (i.e., tcsh) on all machines.

I have spent the better part of the last two days trying to find something but have failed. As far as I can tell, both L1 and L2 are configured identically:
firewall disabled
selinux disabled
and while I have not done a character-by-character comparison of the ssh and sshd configuration files, they appear (visually) to be the same, as shipped with the Fedora distribution.

I need some pointers on where to look for problems, etc.

Thanks.

Bill Lee
 
Old 04-09-2009, 09:36 PM   #2
abolishtheun
Member
 
Registered: Mar 2008
Posts: 183

Rep: Reputation: 31
the fact that you can ssh into the box at all means that it's not a firewall issue.... can you run other commands besides echo? say, ls? what happens when you use the -v (verbose) with ssh?
 
Old 04-10-2009, 08:39 AM   #3
billlee
Member
 
Registered: Jun 2003
Location: East Texas
Distribution: Fedora (24)
Posts: 47

Original Poster
Rep: Reputation: 16
I tried others besides "echo". Remote commands via ssh work to the F8 laptop but not to the F10 system.

Regards,

Bill
 
Old 04-10-2009, 09:16 AM   #4
billlee
Member
 
Registered: Jun 2003
Location: East Texas
Distribution: Fedora (24)
Posts: 47

Original Poster
Rep: Reputation: 16
From the F10 desktop, I issued this:

ssh -v delta pwd

I get the following:
---------------------------------------------
OpenSSH_5.1p1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to delta [192.168.0.104] port 22.
debug1: Connection established.
debug1: identity file /home/bill/.ssh/identity type -1
debug1: identity file /home/bill/.ssh/id_rsa type -1
debug1: identity file /home/bill/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1
debug1: match: OpenSSH_5.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'delta' is known and matches the RSA host key.
debug1: Found key in /home/bill/.ssh/known_hosts:3
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found

debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found

debug1: Unspecified GSS failure. Minor code may provide more information


debug1: Next authentication method: publickey
debug1: Trying private key: /home/bill/.ssh/identity
debug1: Trying private key: /home/bill/.ssh/id_rsa
debug1: Offering public key: /home/bill/.ssh/id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 433
debug1: read PEM private key done: type DSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LANGUAGE =
debug1: Sending env LC_ALL = en
debug1: Sending command: pwd
---------------------------------------------

Nothing ever returns from the pwd command.

Regards,

Bill Lee
 
Old 04-11-2009, 06:22 AM   #5
billlee
Member
 
Registered: Jun 2003
Location: East Texas
Distribution: Fedora (24)
Posts: 47

Original Poster
Rep: Reputation: 16
And it's not JUST ssh of a command: NOTHING works other than ssh for a remote shell! (E.g., scp)

Help!!

Bill Lee
 
Old 04-11-2009, 07:40 AM   #6
billlee
Member
 
Registered: Jun 2003
Location: East Texas
Distribution: Fedora (24)
Posts: 47

Original Poster
Rep: Reputation: 16
More log information:

Running sshd -d from a root shell on the laptop(delta). Captured the debug output to a file.

Ran "ssh -v delta /bin/pwd" on the desktop.

It looks like the client and the server are BOTH requesting the other to send the "no-more-sessions@openssh.com" and are in a deadly embrace.

Here are the pertinent (i.e., tail) portions of the debug information.
--------desktop doing the ssh -v invocation--------------
....

debug1: Next authentication method: publickey
debug1: Trying private key: /home/bill/.ssh/identity
debug1: Trying private key: /home/bill/.ssh/id_rsa
debug1: Offering public key: /home/bill/.ssh/id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 433
debug1: read PEM private key done: type DSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LANGUAGE =
debug1: Sending env LC_ALL = en
debug1: Sending command: /bin/pwd
------------------------------------------------------

------------laptop doing the sshd -d invocation ------
...
Accepted publickey for bill from 192.168.0.100 port 49782 ssh2
debug1: monitor_child_preauth: bill has been authenticated by privileged process
debug1: temporarily_use_uid: 500/500 (e=0/0)
debug1: ssh_gssapi_storecreds: Not a GSSAPI mechanism
debug1: restore_uid: 0/0
debug1: SELinux support disabled
debug1: PAM: establishing credentials
debug1: PAM: establishing credentials
debug1: permanently_set_uid: 500/500
debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype session rchan 0 win 2097152 max 32768
debug1: input_session_request
debug1: channel 0: new [server-session]
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_global_request: rtype no-more-sessions@openssh.com want_reply 0
User child is on pid 3522
------------------------------------------------------------

(The red is mine for emphasis.)

Both ends of the communication were hung at the point where the above logs end.

Still looking for help.

Regards,

Bill Lee
 
  


Reply

Tags
ssh


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
rsync ssh - how to execute shell commands on server banjer Linux - Newbie 4 11-04-2009 02:01 PM
can ssh execute multiple commands at the same time? Singist Linux - Networking 2 04-04-2006 09:14 AM
rpm and yum commands failing on CentOS 4.2 amussaw Linux - Newbie 1 03-21-2006 10:06 AM
execute multiple ssh remote commands tom221 Linux - Newbie 2 01-28-2005 01:00 PM
C -how do i execute linux commands? ocularbob Programming 7 02-29-2004 01:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:01 AM.

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