Try this package https://github.com/appleboy/easyssh-proxy

http://stackoverflow.com/a/42920593/998718


Yanglong Liu於 2014年1月12日星期日 UTC+8下午5時34分18秒寫道:
>
> Thank you Sir, this may help me, I will check it lately.
> And do you know how to use the ssh terminal? and How to set its config to 
> let the output in color?
> Thank you again.
>
> 在 2014年1月3日星期五UTC+8上午7时43分23秒,Dave写道:
>>
>> Recently solved this myself:
>>
>> https://gist.github.com/zxvdr/8229523
>>
>>
>> On 27 December 2013 04:15, Yanglong Liu <[email protected]> wrote:
>>
>>> Thank you for your answer, but it can not help me.
>>> the usage scenario is this:
>>>     I have only one A type server and one B type server ,but have many 
>>> 'C' type server names as "C1""C2""C3", only B knows which "C" type server 
>>> the "user" want to ssh, the relation is stored in mysql. when "user" ssh to 
>>> B server , the "SSh Proxy" will search the goal C type server , and the 
>>> "user" will as a common new user "god" on C type servers. 
>>> so ,above is my requirement. And I want to use go.crypto/ssh to 
>>> implement the "Proxy".
>>>    Thank you for help.
>>>
>>> 在 2013年12月27日星期五UTC+8下午7时55分19秒,Dave Cheney写道:
>>>>
>>>> I wouldn't write any software for this, openssh can do all this for 
>>>> you. I think proxy command is the thing you want, but I'd just do
>>>>
>>>> ssh A -t -- ssh god@C
>>>>
>>>> If you have ssh keys setup (and you should always use ssh keys) this 
>>>> just works. 
>>>>
>>>> On 27 Dec 2013, at 22:51, Yanglong Liu <[email protected]> wrote:
>>>>
>>>>  Hi:
>>>>     Recently I want to implement a function。 
>>>> The function is described below:
>>>> I have 3 server A,B,C , when I ssh from A as command "ssh [email protected] 
>>>> " , the link will pass through B finally to C as another user "god".
>>>> In short , on server A command "ssh [email protected]", the shell will show 
>>>> ">[email protected]:~ ______".
>>>> Now I want to implement the "SSH PROXY" on Server B, but I do not know 
>>>> how to implement it with package go.crypto/ssh.
>>>> Finding for help!!
>>>>         Thank you very much.
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "golang-nuts" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>>
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "golang-nuts" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to