home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / ckscripts / skermit < prev    next >
Text File  |  2020-01-01  |  1KB  |  52 lines

  1. #!/usr/local/bin/kermit +
  2. #
  3. # skermit -- SSH connection to Kermit server subsystem.
  4. #
  5. # In Unix, assumes OpenSSH 3.0.2p1 client.
  6. # In Windows, uses K95's built-in SSH client.
  7. # Documentation: http://www.columbia.edu/kermit/skermit.html
  8. #
  9. # Requires C-Kermit 8.0.201 or later or K95 1.1.21 or later.
  10. #
  11. # Command-line arguments:
  12. #  1 = host (required, prompted for if not supplied)
  13. #  2 = user (optional, defaults to local username)
  14. #
  15. # Version: 1.00, Sun Feb  3 15:59:36 2002
  16. #
  17. while not def \%1 {
  18.     ask \%1 { Host: }
  19. }
  20. if < \v(argc) 2 {
  21.     ask \%2 { User [\v(user)] }
  22. }
  23. if not def \%2 .\%2 := \v(user)
  24. set exit warning off
  25. if k-95 {
  26.     set host /network:ssh /user:\%2 \%1 /subsystem:kermit
  27. } else {
  28.     set host /pipe ssh -e none -l \%2 -T -s \%1 kermit
  29. }
  30. if fail exit 1
  31. set reliable on
  32. if not k-95 echo You might have to wait for a password prompt here...
  33. set input echo on
  34. input 60 KERMIT READY TO SERVE...
  35. .\%9 := \v(status)
  36. echo
  37. if \%9 exit 1 Kermit Server not found
  38. set input echo off
  39.  
  40. echo
  41. echo You have a Kermit server on the other end of the connection.
  42. echo Use the following commands: SEND, GET, RCD, RPWD, RDIR, ...
  43. echo Close the connection with BYE or FINISH.
  44. echo
  45.  
  46. # At this point the Kermit client issues its prompt, allowing the user to
  47. # issue interactive commands to the server.  For totally automated sessions,
  48. # replace the preceding block of ECHO commands with the commands of your
  49. # choice, and include BYE and EXIT commands at the end of the script.
  50.  
  51. end
  52.