I am trying to write a bash function shown below. I am trying to scp my .bashrc
to the target machine. I want to do modify the following function in the below two ways.
I want to enter the password only once. Can I cache the password entered for scp and use the same for ssh.
I also want to execute
bash --rcfile
from the server rather then from my machine.
My starting example code is below:
export_bashrc() {
scp ~/.bashrc $1:/root/ws_karthik
ssh $1
bash --rcfile /root/ws_karthik/.bashrc
}
Can anyone suggest how to get around this issue?