M
M
Mikhail Gavrilyuk2022-04-10 19:00:18
linux
Mikhail Gavrilyuk, 2022-04-10 19:00:18

How can I access different directories using different hostnames when connecting using the ssh config file?

How is it possible, when connecting to host1, to get into the /var/www/host1 folder,
and when connecting to host2 to /var/www/host2
, while the user and server are the same

Host host1
Hostname xxx.xxx.xxx.xxx
IdentityFile ~/.ssh/id_rsa
User root
Port xxxxx

Host host2
Hostname xxx.xxx.xxx.xxx
IdentityFile ~/.ssh/id_rsa
User root
Port xxxxx

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AVKor, 2022-04-10
@AVKor

1 , 2 .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question