Skip to content

Commit

Permalink
Merge pull request #102 from github/always-use-ssh-port
Browse files Browse the repository at this point in the history
Always specify ssh port when using ghe-ssh
  • Loading branch information
rtomayko committed Feb 12, 2015
2 parents fad3768 + dde67ef commit 3ba7048
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions share/github-backup-utils/ghe-ssh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ fi
port=$(ssh_port_part "$host")
host=$(ssh_host_part "$host")

# Add port / -p option when non-standard port given.
[ "$port" != "22" ] && opts="-p $port $opts"

# Add user / -l option
user="${host%@*}"
[ "$user" = "$host" ] && user="admin"
Expand All @@ -61,4 +58,4 @@ fi
$GHE_VERBOSE_SSH && set -x

# Exec ssh command with modified host / port args and add nice to command.
exec ssh $opts -o BatchMode=yes "$host" -- $GHE_NICE $GHE_IONICE "$@"
exec ssh -p $port $opts -o BatchMode=yes "$host" -- $GHE_NICE $GHE_IONICE "$@"

0 comments on commit 3ba7048

Please sign in to comment.