I am writing a script to use SSH profiles, ~ / scripts / ssh-profiled.sh
PROFILE=`cat ~/script/ssh-profiles/$1` echo [ssh $PROFILE] ssh $PROFILE
~ / scripts / SSH profiles / tummi
-i ~/Dropbox/security/key-nopass/key-nopass.pvt bart@example.com
When I run the script, it fails:
bart@bart-laptop :~$ script/ssh-profiled.sh tummi [ssh -i ~/Dropbox/security/key-nopass/key-nopass.pvt bart@example.com ] Warning: Identity file ~/Dropbox/security/key-nopass/key-nopass.pvt not accessible: No such file or directory. bart@example.com password:
But it works:
bart@bart-laptop :~$ ssh -i ~/Dropbox/security/key-nopass/key-nopass.pvt bart@example.com Linux tummi 2.6.32-24-server
Is there a / gotcha error in my script?
source share