When accessing with specific user it gives an ssh on another server [closed]

0

I have 2 Servers:

Example: A and B.

What I need:

When I connect to the server A with a specific user it automatically makes a ssh on the B server, if possible already sending the login and password parameters and already log in automatically.

How could you do this?

    
asked by anonymous 27.04.2017 / 21:43

1 answer

2

First you have to configure server A so that it can access to server B using public and private keys inves de com username and password. To do this, read here

After this, you can run ssh to connect to server A by sending another ssh command to connect to server B, for example:

ssh root@servidorA "ssh -T servidorB"
    
28.04.2017 / 09:07