On 01/31/2012 01:09 PM, Mircea Ciocan wrote:
>   Am si eu o intrebare, as vrea sa fac urmatoarea chestie:
>
>   Pe un device remote ruleaza un program pe post de shell la care ma
> pot conecta cu un ssh client oarecare dupa autentificarea cu chei
> publice.
> Devicele e destul de anemic astfel incat conectarea initiala e lenta,
> deci as vrea ca odata facuta conexiunea sa ramina deschisa.
> Programul de pe device elimina din timp in timp niste chestii pe ecran
> AKA stdout si ara sta si iar scrie cate ceva.
>
> As vrea din locul unde ma conectez pe device sa fac un program ( C/C++
> ) care sa:
> - Stabileasca conexiunea criptata catre device.
> - Sa imi permita sa-i trimit comenzi si sa astept rezultatele (
> redirectare stdin/stdout catre ceva descriptori locali care pot fi
> poll-uiti ?!?! )
> in care sa ma uit tot prin program fara a parai conexiunea deschisa initial.
>
>   Ceva idei/exemple/rtfm-uri de la cei care s-au mai lovit de asa ceva ?
man ssh_config
ControlMaster
Enables the sharing of multiple sessions over a single network 
connection. When set to “yes”, ssh(1) will listen
for connections on a control socket specified using the ControlPath 
argument. Additional sessions can connect to
this socket using the same ControlPath with ControlMaster set to “no” 
(the default). These sessions will try to
reuse the master instance’s network connection rather than initiating 
new ones, but will fall back to connecting
normally if the control socket does not exist, or is not listening.


http://www.harding.motd.ca/autossh/
autossh is a program to start a copy of ssh and monitor it, restarting 
it as necessary should it die or stop passing traffic. The idea is from 
rstunnel (Reliable SSH Tunnel), but implemented in C.

_______________________________________________
RLUG mailing list
[email protected]
http://lists.lug.ro/mailman/listinfo/rlug

Raspunde prin e-mail lui