home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
scripts
/
ckermit
/
skermit
< prev
next >
Wrap
Text File
|
2002-02-02
|
1KB
|
52 lines
#!/usr/local/bin/kermit +
#
# skermit -- SSH connection to Kermit server subsystem.
#
# In Unix, assumes OpenSSH 3.0.2p1 client.
# In Windows, uses K95's built-in SSH client.
# Documentation: http://www.columbia.edu/kermit/skermit.html
#
# Requires C-Kermit 8.0.201 or later or K95 1.1.21 or later.
#
# Command-line arguments:
# 1 = host (required, prompted for if not supplied)
# 2 = user (optional, defaults to local username)
#
# Version: 1.00, Sun Feb 3 15:59:36 2002
#
while not def \%1 {
ask \%1 { Host: }
}
if < \v(argc) 2 {
ask \%2 { User [\v(user)] }
}
if not def \%2 .\%2 := \v(user)
set exit warning off
if k-95 {
set host /network:ssh /user:\%2 \%1 /subsystem:kermit
} else {
set host /pipe ssh -e none -l \%2 -T -s \%1 kermit
}
if fail exit 1
set reliable on
if not k-95 echo You might have to wait for a password prompt here...
set input echo on
input 60 KERMIT READY TO SERVE...
.\%9 := \v(status)
echo
if \%9 exit 1 Kermit Server not found
set input echo off
echo
echo You have a Kermit server on the other end of the connection.
echo Use the following commands: SEND, GET, RCD, RPWD, RDIR, ...
echo Close the connection with BYE or FINISH.
echo
# At this point the Kermit client issues its prompt, allowing the user to
# issue interactive commands to the server. For totally automated sessions,
# replace the preceding block of ECHO commands with the commands of your
# choice, and include BYE and EXIT commands at the end of the script.
end