Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Ok , I will try to clear my goal.
If I append:

Host * controlmaster auto controlpath /tmp/ssh-%r@%h:%p

to ssh_config file,
Then I can: ssh host@ip:port to my server multiple times , and from the server side, I will only see only one active connection (the first one).
I would like to achieve samething using OpenSSH perl module.
What I can see is that openssh module creates random sockets , so it will never reuse an existing one (please add your opinion here)
like:

[root@smokeping probes]# ls -altr /tmp/.libnet-openssh-perl/ total 8 drwxrwxrwt. 12 root root 4096 Oct 1 10:02 .. srw-------. 1 root root 0 Oct 1 10:02 77920c754112ab47c6163bcfc58 +bed18 srw-------. 1 root root 0 Oct 1 10:02 0c600465ef924c5229c418a8871 +b9d36 srw-------. 1 root root 0 Oct 1 10:02 e675b23529a57eb7b59e85a7237 +7df74 srw-------. 1 root root 0 Oct 1 10:02 e4690abec752975a4476dd63232 +19814 srw-------. 1 root root 0 Oct 1 10:02 d3e28b44e996a2c3858850156cc +3b238 srw-------. 1 root root 0 Oct 1 10:02 24c7eb01f6b8e230db4e7ad7464 +6cc54 srw-------. 1 root root 0 Oct 1 10:02 8146e02629748a287f979c16827 +6b114 srw-------. 1 root root 0 Oct 1 10:02 6a7ebf7458398a282a947479de0 +14edc srw-------. 1 root root 0 Oct 1 10:02 6c1ebc546764c1bfbd755d1820d +bf5a5 srw-------. 1 root root 0 Oct 1 10:02 67d4449c8336035d4bc66fccf47 +ceddf srw-------. 1 root root 0 Oct 1 10:02 af933a70fa19f2e0631dd381587 +d9797 srw-------. 1 root root 0 Oct 1 10:02 09653a62f88e4954a6ba2c85a74 +37400 srw-------. 1 root root 0 Oct 1 10:02 b8b2ecc3c59c9bd14a147b0f4e4 +ebb01 srw-------. 1 root root 0 Oct 1 10:02 c9eb9ff5c25c1ea8bf8ae6fa0a9 +e6550 srw-------. 1 root root 0 Oct 1 10:02 966185842d9ab1ff5ce17afd3c9 +51893 srw-------. 1 root root 0 Oct 1 10:02 cf32ef2944cab6c8aeb5055b1a6 +72ee3 srw-------. 1 root root 0 Oct 1 10:02 a6c87213c639efca7be3d902b97 +f14ca srw-------. 1 root root 0 Oct 1 10:02 7c903101f2588c0d59ba1951806 +ab423 srw-------. 1 root root 0 Oct 1 10:02 0d8fe313c0fe25601df92bd10f5 +5f48a srw-------. 1 root root 0 Oct 1 10:02 5073e76ae24b05de392b4b12577 +7138e srw-------. 1 root root 0 Oct 1 10:02 a3c0acb9d2765801610a1c80c88 +e8086

So ... I dont know whow to tweak it to work as I want.
Should I force openssh module to create allways same socket and then add the propper rule to ssh_config system file ?
or both , perl module and ssh system client does nothing to do between them ?
Ok , hope to be more clear about my task.
Thanks.


In reply to Re^2: Net::OpenSSH mater mode is not working by leostereo
in thread Net::OpenSSH mater mode is not working by leostereo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-03-28 16:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found