exec() arguments get confusing

From: Bert (bad_bert_at_hotmail.com)
Date: 05/28/05

  • Next message: Paul Pluzhnikov: "Re: exec() arguments get confusing"
    Date: 28 May 2005 07:13:39 -0700
    
    

    Hi,

    I'm calling exec() to make a SSH connection to one of my network's
    computer using execlp("ssh","ssh","compname",...,(char*)0), where the
    ... stands for further arguments one would pass to 'ssh'.
    The problem I'm getting is that about 40% of the time i make such a
    call, 'ssh' reports that "ssh: unknown host" as if it took the first
    argument argv[0] (which is usually the name of the executable) as the
    host I'm trying to connect to instead of using 'compname'.
    The weird thing is that it's not systematic and using
    execlp("ssh","compname",...,(char*)0) won't work.

    Any ideas?
    (I'm on Linux 2.6.8)

    Thanks in advance for any help


  • Next message: Paul Pluzhnikov: "Re: exec() arguments get confusing"

    Relevant Pages

    • Re: reconnect expect to a rebooting remote
      ... If the appliance goes away the hard way and your ssh connection ... Either way you will get eof only when the network stack on the ... sshd is not running you will get connection refused. ...
      (comp.lang.tcl)
    • Keeping OpenSSH connections alive
      ... I connect from B to A by means of ssh. ... is, on B I am running X windows, and I open xterms that create a shell ... suspend software available in www.suspend2.net. ... forked in A for each ssh connection from B stay alive for just a few ...
      (SSH)
    • Re: ssh - connection refused
      ... not the ssh connection is thru the local network only or thru the ... Then, the pb could come from my router, and its configuration. ... 192.168.1.17 (the IP of my homeserver on the local lan) ...
      (Ubuntu)
    • Re: Windows SSH Client start as a service?
      ... >> Why would you want to run the client as a service? ... >> order to interact with the desktop (to type commands into the SSH window) ... he only wants to use it for port forwarding. ... it would make the SSH connection and start the first ...
      (comp.security.ssh)
    • Re: normal behavior for openssh time outs?
      ... > times out ssh connections when idle for longer than a certain time, ... > the terminal window which I ran the client in becomes unusable. ... > is if I connect with ssh, leave the ssh connection idle for long ... Newer versions of OpenSSH have a client-side keepalive ...
      (SSH)