problem with plink and remote command

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


Date: Fri, 26 Mar 2004 11:49:14 +0100

hello
in first sorry for my poor english.

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.Then
if y want to do that in a batch file, the command line become :

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 vncserver.

but it dont works i've got the following error
Server sent command exit status 0
All channels closed. Disconnecting

i dont know where is the problem

here is the log with the verbose option of plink

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

New 'X' desktop is test.iut-chartres.fr:6

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/test.iut-chartres.fr:6.log

Server sent command exit status 0
All channels closed. Disconnecting



Relevant Pages

  • How can I restrict incoming root rsync over ssh to specified command?
    ... will use rsync over ssh to pull certain directories from the ssh ... Here's an example of the command, ... Even with the server locked up in a room with no user ...
    (comp.os.linux.security)
  • Re: rsync and ssh simple question
    ... possible to tie an SSH key to a specific command on a remote server, ... For instance, when you run rsync over ssh, the local rsync command ...
    (RedHat)
  • 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)
  • Re: ssh: start vnc server remotely
    ... > I have x11vnc on my computer and I want to start the server using ssh ... > command in ssh and that command just runs on the computer I'm connected ... The only people for me are the mad ones -- the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn like fabulous yellow Roman candles. ...
    (comp.os.linux.misc)
  • [1/3] POHMELFS high performance network filesystem. Documentation.
    ... +POHMELFS: Parallel Optimized Host Message Exchange Layered File System. ... * Fast and scalable multithreaded userspace server. ... * Client is able to switch between different servers (if one goes down, ... +command (or set of commands, which is frequently used during data writing: ...
    (Linux-Kernel)