Roman Drahtmueller <draht@suse.de> on 18.07.2001 16:56:09 Bitte antworten an Roman Drahtmueller <draht@suse.de> An: Thomas Schweikle <tschweikle@fiducia.de> Kopie: <suse-security@suse.de> Thema: Re: [suse-security] Misterious non functions with OpenSSH
Using SSH to execute commands on an other host I found:
The script
echo "-- server" ssh -l stream server ls -la /var/log/server/*.log echo "-- server-extern" ssh -l stream server-extern ls -la /var/log/server/*.log
Whatever problem with ssh/openssh there might be following you behind, there is another mistake in the commandline in the first place: quoting.
ssh -l stream server ls -la /var/log/server/*.log
[...]
Quoting was done - I didn't notice these backslashes removed sending my mail. Thus the line in reality reads: ssh -l stream server ls -la /var/log/server/\*.log
[...]
Use "-v" to see what happens. Otherwise, there's little chance to find out what goes wrong...
Here it is '-v' set: command executed: "ssh -v -l stream server ls -la /var/log/server/\*.log" OpenSSH_2.9p1, SSH protocols 1.5/2.0, OpenSSL 0x0090601f debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Seeding random number generator debug1: Rhosts Authentication disabled, originating port will not be trusted. debug1: restore_uid debug1: ssh_connect: getuid 499 geteuid 499 anon 1 debug1: Connecting to server [192.168.13.15] port 22. debug1: temporarily_use_uid: 499/102 (e=499) debug1: restore_uid debug1: temporarily_use_uid: 499/102 (e=499) debug1: restore_uid debug1: Connection established. debug1: identity file /home/stream/.ssh/identity type 0 debug1: identity file /home/stream/.ssh/id_rsa type -1 debug1: identity file /home/stream/.ssh/id_dsa type -1 debug1: Remote protocol version 1.5, remote software version OpenSSH_2.9p1 debug1: match: OpenSSH_2.9p1 pat ^OpenSSH debug1: Local version string SSH-1.5-OpenSSH_2.9p1 debug1: Waiting for server public key. debug1: Received server public key (768 bits) and host key (1024 bits). debug1: Host 'server' is known and matches the RSA1 host key. debug1: Found key in /home/stream/.ssh/known_hosts:5 debug1: Encryption type: 3des debug1: Sent encrypted session key. debug1: Installing crc compensation attack detector. debug1: Received encrypted confirmation. debug1: Trying RSA authentication with key 'stream@server' debug1: Received RSA challenge from server. debug1: Sending response to host key RSA challenge. debug1: Remote: RSA authentication accepted. debug1: RSA authentication accepted by server. debug1: Sending command: ls -la /var/log/server/*.log debug1: Entering interactive session. debug1: fd 0 IS O_NONBLOCK debug1: fd 1 setting O_NONBLOCK debug1: fd 2 IS O_NONBLOCK -rw-r----- 1 stream stream 32565 Jul 19 16:59 /var/log/server/access.log -rw-r----- 1 stream stream 0 Jul 19 01:07 /var/log/server/cache.log -rw-r----- 1 stream stream 683 Jul 19 15:24 /var/log/server/error.log -rw-r----- 1 stream stream 14049 Jul 17 14:15 /var/log/server/start.log At this point the whole thing hangs. SSH won't return, but closing connection to the remote system. Killing this process will help. Killed by signal 15. debug1: Calling cleanup 0x8064ea0(0x0) -- Thomas