0
With the following topology:
+----------+ ssh -J +--------+ +--------------+
|clienthost| =========> |jumphost| ====> |restrictedhost|
+----------+ +--------+ +--------------+
.bashrc - - - - - > .bashrc
This successfully allows me to ssh into restrictedhost
:
ssh -oProxyCommand="ssh -W %h:%p me@jumphost" me@restrictedhost
and results in an uncustomized bash shell:
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-45-generic x86_64)
Last login: Mon Nov 12 16:23:06 2018 from 10.250.20.3
me@restrictedhost:~$
What I want is to carry my dotfile from jumphost
(not the client, that's more complicated) to restrictedhost
so that, among other things, I get my personalized prompt:
bash Mon Nov 12 16:36:21 ~/ me@MacBook-Pro>
How can I apply jumphost:/tmp/.bashrc
file to the shell at restrictedhost
?
What I do know
When there is no jumphost involved, this gives me my bash customizations:
ssh me@unrestricted "echo "$(cat ${HOME}/.bashrc | base64 -w 0)" | base64 --decode > /tmp/${USER}_bashrc; cd /tmp/; bash --rcfile /tmp/${USER}_bashrc"
If I directly apply 1. to the jump, I get no command prompt (or other bash customizations) at all:
ssh -oProxyCommand="sshpass -p Empty$paces ssh -W %h:%p devteam@man1-pqa" devteam@queue1-pqa "bash --rcfile /tmp/_bashrc"
Cross-posted because the other one is getting downvoted and will probably get closed. – Sridhar Sarnobat – 2018-11-13T01:00:33.620