#!/bin/sh
#
# dtremotelogin -- MCDE: a terminal on another computer, through ssh
#
# Started in a dtterm by the action McdeRemoteLogin (types/dt.dt, the front
# panel's Network drawer).  Asks for user@computer, runs ssh(1); when ssh
# fails the window stays until Return, so its message can be read.
#
# the title of the tab and the window (an xterm title sequence, TermParse.c)
printf '\033]0;Remote Login\007'
printf 'Connect to (user@computer): '
read -r host || exit 0
[ -n "$host" ] || exit 0
printf '\033]0;%s\007' "$host"
ssh "$host" && exit 0
printf '\nPress Return to close. '
read -r _
