Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question