Mercurial > hg > beaglert
annotate scripts/setup_ssh.sh @ 538:58652b93ef7e prerelease
Converted some spaces to tabs
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 24 Jun 2016 01:40:25 +0100 |
parents | 7eb66c7898cb |
children |
rev | line source |
---|---|
giuliomoro@425 | 1 #!/bin/sh |
giuliomoro@462 | 2 SCRIPTDIR=$(dirname "$0") |
giuliomoro@462 | 3 [ -z $SCRIPTDIR ] && SCRIPTDIR="./" || SCRIPTDIR=$SCRIPTDIR/ |
giuliomoro@462 | 4 . $SCRIPTDIR.bela_common || { echo "You must be in Bela/scripts to run these scripts" | exit 1; } |
giuliomoro@462 | 5 |
giuliomoro@516 | 6 [ -z $BBB_HOST ] && BBB_HOST=bbb |
giuliomoro@73 | 7 CONFIG_FILENAME=$HOME/.ssh/config |
giuliomoro@364 | 8 mkdir -p $HOME/.ssh # create the ssh folder if it does not exist |
giuliomoro@364 | 9 printf "\nHost $BBB_HOST\nHostname $BBB_HOSTNAME\nUser $BBB_USER\nStrictHostKeyChecking=no\n\n" >> $HOME/.ssh/config |
giuliomoro@364 | 10 if [ $? -eq 0 ]; |
giuliomoro@364 | 11 then |
giuliomoro@364 | 12 printf "You can now login into the Beaglebone with\n\$ ssh $BBB_HOST\n" |
giuliomoro@364 | 13 else |
giuliomoro@364 | 14 printf "Something went wrong. You should still be able to log into the BeagleBone with \n\$ ssh $BBB_USER@$BBB_HOSTNAME\n" |
giuliomoro@73 | 15 fi |