Skip to content

Instantly share code, notes, and snippets.

@dgpro
Created April 1, 2019 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgpro/227ab0df3b1905498e4baa84585fece5 to your computer and use it in GitHub Desktop.
Save dgpro/227ab0df3b1905498e4baa84585fece5 to your computer and use it in GitHub Desktop.
SSH Script to connect to remote SFTP server
#!/bin/bash
# exit if any of the commands fail
set -e
source ${BASH_SOURCE[0]%/*}/ip.conf
echo -e "Connecting to ip:$ip";
sftp username@$ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment