Im pretty new to shell scripting so excuse my newbness. Anyways, Im basically trying to get my script to seek out the username from whoami (usernames on the server will be the same as a persons login name for their pc) and use that to connect to ssh (with encryption keys). This way I won't have to modify the script for every computer illiterate friend of mine that I give server access to.
Code:
1 #!/bin/bash
2 #bash script to connect to Mephisto file server with encrpyption keys
3 username="/usr/bin/whoami"
4
5 sshfs -p 234 $username@malluen.no-ip.org:/mnt/storage ~/storage
6
7 fi
*Pay no attention to the numbers- they are simply from numbered lines in vim =)