Re: problem with plink and remote command

From: Pascal Legrand (Pascal.Legrand_at_univ-orleans.fr)
Date: 03/26/04


Date: Fri, 26 Mar 2004 12:58:01 +0100


-------- Message original --------

> Pascal Legrand <Pascal.Legrand@univ-orleans.fr> writes:
>
>> i've got a problem with the plink command.
>> i would like to connect to a linux server with ssh, from a windows client with plink, and after use vnc.
>>
>> when i use the following command:
>> plink -ssh -v -2 -i "c:\logici~1\putty\clef\serveu~1.ppk" -L 3000:192.168.151.199:5901
>> root@192.168.151.199
>>
>> and just after in the shell "vncserver", all is ok, the tunnel exist
>> and vncserver working good.
>
> When you run "vncserver", what happens? Does it return you
> immediately to your shell prompt? If so, it's forking off a daemon in
> the background, and this explains the problem you're seeing with
> plink; the vncserver process starts an Xvnc in the background,
> finishes successfully, and therefore the connection is over.
>
> If this is the case, you need to find a way of making vncserver not
> terminate; I suspect you may have to run Xvnc directly instead of
> using vncserver.
>
> (S)

In fact it doesnt matter the command i launch with the command line, if i use the following command
line the problem is the same :
plink -ssh -v -2 -i "c:\logici~1\putty\clef\serveu~1.ppk" -L 3000:192.168.151.199:5901
root@192.168.151.199 ls

the ls command is executed but the tunnel is "broken".

example
plink -ssh -v -2 -i "c:\logici~1\putty\clef\serveu~1.ppk" -L 3000:192.168.151.199:5901
root@192.168.151.199 ls

Server version: SSH-1.99-OpenSSH_3.7.1p2
We believe remote version has SSH1 ignore bug
We claim version: SSH-2.0-PuTTY-Release-0.54
Using SSH protocol version 2
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange
Host key fingerprint is:
ssh-rsa 1024 bb:20:5b:f7:80:a7:37:a6:d1:1d:11:9c:2e:45:8a:6c
Initialised AES-256 client->server encryption
Initialised AES-256 server->client encryption
Using username "root".
Reading private key file "c:\logici~1\putty\clef\serveu~1.ppk"
Offered public key
Offer of public key accepted
Authenticating with public key "Serveur-de-test-dsa-key-20040309"
Access granted
Opened channel for session
Local port 3000 forwarding to 192.168.151.199:5901
Started a shell/command
Server sent command exit status 0
All channels closed. Disconnecting
drakx
tmp

if the tunnel is broken just after the vncserver command, its a problem because i cant use vncviewer
from my local windows client throught an ssh tunnel.
What i want is the tunnel is keeped after the command option

sorry again for my poor english and thanks for your answer

-- 
Pascal Legrand
*IUT de Chartres* - _Service Informatique_
1 place Pierre Mendès France - 28000 Chartres
Tel: 02 37 91 83 36 - Fax: 02 37 91 83 01
Pascal.Legrand@univ-orleans.fr


Relevant Pages

  • Re: Really need help on this one
    ... Is there a way to read the output of a particular command into ... Heres a better example using ssh. ... set timeout $timeout ... exec kill -9 $pid ...
    (comp.lang.tcl)
  • Executing remote commands via ssh causes zombie process
    ... I tried to execute the command "ls -l" using the ssh executable on the ... it's not relevant whether I use plink or ssh. ...
    (Debian-User)
  • RE: midnight commander and ssh sftp
    ... midnight commander and ssh sftp ... which is displayed at the bottom of the MC panel. ... "Left file command options right" at the top of the MC ... MC SSH session with the remote host by hitting F10 key. ...
    (freebsd-questions)
  • Re: [Info-ingres] problems with ssh
    ... Check the SSHD log on the server for errors. ... ancient version of SSH, unfortunately. ... the command seems to have functioned - but just wont terminate and leaves a process hanging around. ... Duckman: You got anymore of those glues? ...
    (comp.databases.ingres)
  • Scripts using SSH and SSH_ASKPASS
    ... To test SSH scripts you better destroy the control TTY. ... The trick is to run YOUR script on YOUR local ... As for the password relaying command: this needs not be an X command. ... # we read one line from a temporary pipe. ...
    (comp.security.ssh)