#!/bin/bash if command -v ssh &> /dev/null; then # Launch screen remotely via ssh and resume the remote session. function ressh() { ssh -t "$@" screen -D -R } fi if command -v ssh-agent &> /dev/null; then # Use ssh-agent. # # Assumes "$HOME/.ssh-agent" has been updated with the info from the # running, agent, this can be done by using a user con job: # @reboot ssh-agent -s | grep -v echo > $HOME/.ssh-agent if [ -z "$SSH_CLIENT" ] && [ -e "$HOME/.ssh-agent" ]; then . "$HOME/.ssh-agent" alias keyon="ssh-add -t 10800" alias keyoff='ssh-add -D' alias keylist='ssh-add -l' fi fi