When accessing with specific user he give an ssh on another server

Asked

Viewed 626 times

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 make a ssh on the server B, if possible already sending login and password parameters and already log in automatically.

How could I do that ?

1 answer

2


First you have to configure the A server so that it can access the B server using public and private keys instead of with user and password. To do this, read here

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

ssh root@servidorA "ssh -T servidorB"
  • Until then blz, how else do I make it automatic ? , so I don’t want my user to type: ssh root@servorA "ssh -T servorB"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.