I need to create some aliases on remote Ubuntu and enable them on ssh-connection. So I defined aliases in ~/.bashrc file (on that remote Ubuntu).
Now when I do
ssh root@<Remote IP>
source ~/.bashrc
I can use those aliases... But instead of do source ~/.bashrc manually each time I want to automate that as well. So I tried
sshpass -p 'none' ssh -o StrictHostKeyChecking=no root@<Remote IP> -t 'source ~/.bashrc'
... but the connection is closed
if I do
sshpass -p none ssh -o StrictHostKeyChecking=no root@<Remote IP> -t 'ssh root@<Remote IP>; source ~/.bashrc'
then it's not disconnected, but no possibility to input commands - no reaction from terminal on input
So how to connect to remote host and load ~/.bashrc in the same command?