Reputation: 55
I tried to write a bash file for establishing a SSH tunnel from Pi 1 to Pi2. I found several guides and did it according to them - so far so good. Everything is working now if I type the following in the terminal:
ssh -i .ssh/key_rsa [email protected]
I tried the same line of code in a bash file, but there appears the following error message: „File or Dictionary not found“
My bash Code:
#!usr/bin/bash -f
xterm -title “Terminal1“ -hold -e ssh -i “.ssh/key_rsa“ “ [email protected]“
What's the problem here?
Upvotes: 0
Views: 54
Reputation: 630
Are you running it from inside you $HOME where .ssh/key_rsa
is located?
Perhaps set it to use an absolute path like $HOME/.ssh/key_rsa
Upvotes: 1