Sponsored Content
Top Forums Shell Programming and Scripting Tcl / expect need to attempt telnet if failed ssh Post 303028287 by popeye on Thursday 3rd of January 2019 01:50:00 PM
Old 01-03-2019
Thanks fellas .. Centos linux .. and I am using the -d .. but that doesnt give me much info related to using an "OR"
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Expect with tcl/tk

hai all, i have an tcl script in which i have been reading the DUT Command prompt of an cisco switch as DUT Command Prompt : cisco* and running the test case of stp now the problem is if i have given any blank space in between the cisco or at the startup then the Expect is not identifying the... (0 Replies)
Discussion started by: sanjustudy
0 Replies

2. UNIX for Dummies Questions & Answers

Expect/Tcl help?

Does anyone know of an expect/tcl forum that is as helpful as this one is for shell scripting? Or if anyone has any expect knowledge, can you please provide some guidance on how to write to a local error log based on output from a ssh session? I have something like this: foreach host... (2 Replies)
Discussion started by: earnstaf
2 Replies

3. Shell Programming and Scripting

Tcl expect HELP

In the following "for" loop I assume the the script will expect "anyway", "first" NOT in any paticular order and send "yes" when there found, breaking out of the loop when "$prompt" is found. The way it is working is like 3 individual expect lines, and they MUST be in cronological order. ANY help... (0 Replies)
Discussion started by: dave_m
0 Replies

4. Shell Programming and Scripting

tcl/expect

Can someone identify what is the problem here?. no children while executing "exp_wait -nowait -i -1" (procedure "logOptions" line 45) invoked from within "logOptions" (procedure "doExecute" line 98) invoked from within "doExecute" (procedure "main" line 32) ... (7 Replies)
Discussion started by: calsum
7 Replies

5. Shell Programming and Scripting

Webpage to Telnet via Perl and Expect: Telnet problem?

Somewhat long story: I have a simple Perl CGI script that uses Expect to Telnet to a device and grab some data, and then spits it back to Perl for display on the Webpage. This works for many devices I've tried, but one device just fails, it keeps rejecting the password on this device, only... (1 Reply)
Discussion started by: jondo
1 Replies

6. Shell Programming and Scripting

Need 'expect' help, ssh/telnet and trapping

So here is what I am trying to do. I have a large # of switches and routers I am trying to log into. Unfortunately some have ssh only, some have telnet only. and some i have never logged into with ssh. I first want it to SSH, if i have never logged into the box it will ask for adding the ssh key. I... (0 Replies)
Discussion started by: ippy98
0 Replies

7. UNIX for Dummies Questions & Answers

Expect/Tcl help

hi, I am new in Expect. I have a question about expect timeout. suppose I have a structure of expect { ".."{ send"............"} timeout{ ............... } } The silly question is if I reach timeout, how can I store the error message showing on the screen to... (2 Replies)
Discussion started by: allenxiao7
2 Replies

8. Shell Programming and Scripting

tcl/expect magic ssh dictionary password

Hi gurus, I am trying to do some expect/TCL magic. My goal is to write some kind of password guessing script (nearly similar to dictionary attack against ssh). I read that this could be possible with expect/TCL, I am newbie in this language, its function and its terms so please be patient ;) ... (3 Replies)
Discussion started by: wakatana
3 Replies

9. Programming

Failed SSL Connection Attempt

The below error message I started seeing using Ubuntu 14.04 and was wondering if the forum has seen it because I cant seem much on the net for this: perl -e 'use IO::Socket::SSL qw(debug3);IO::Socket::SSL->new(PeerAddr=>"10.0.0.100",PeerPort=> 443,Proto=>"TCP") or die $!' DEBUG:... (1 Reply)
Discussion started by: metallica1973
1 Replies

10. Forum Support Area for Unregistered Users & Account Problems

Further to my query re: failed attempt to change email address on existing account

Neo Thanks for your reply to my original post, entitled "Problem changing the email address associated with my unix.com account". I am unable to reply to you in that thread, as I am unable to log-on to unix.com! From what you said about purging dormant accounts, it is likely that my account... (1 Reply)
Discussion started by: irb
1 Replies
ZSSH(1) 							       ZSSH								   ZSSH(1)

NAME
zssh - interactive file transfer wrapper for ssh SYNOPSIS
zssh [zssh options] [--] [ssh options] ztelnet [zssh options] [--] [telnet options] DESCRIPTION
zssh (Zmodem SSH) is a program for interactively transferring files to a remote machine while using the secure shell ( ssh ). It is intended to be a convenient alternative to scp , allowing to transfer files without having to open another session and re-authenticate one- self. zssh is an interactive wrapper for ssh used to switch the ssh connection between the remote shell and file transfers. This is achieved by using another tty/pty pair between the user and the local ssh process to plug either the user's tty (remote shell mode) or another process (file transfer mode) on the ssh connection. ztelnet behaves similarly to zssh, except telnet is used instead of ssh. It is equivalent to 'zssh -s "telnet -8 -E"' Files are transferred through the zmodem protocol, using the rz and sz commands. zssh behaves as an usual ssh session until the escape sequence is depressed ( default is ^@ which can be produced by pressing C-space, or C-2, or C-` ), which enables file transfer mode. A new prompt is then displayed, and commands can be executed locally to initiate file transfers (among other things). It roughly behaves as a local shell featuring line edition, history and completion (thanks to libreadline), globbing, and escape characters ( " ' and ). The following builtins are handled by zssh itself: ? , cd , disconnect , escape , exit , help , hook , quit , repeat , rz , suspend , sz , version cd <dir> change current directory disconnect disconnect and exit escape [^X] Change escape key to ^X. Without argument, print current escape key exit exit file transfer mode. ^D may also be used for this purpose. help print help and tips ? hook prg [args] Hook program 'prg' on the the pty. Its standard input and output will go through the ssh channel. typing 'sz'/'rz' is in fact equivalent to 'hook sz'/'hook rz' A weird imagination is most useful to gain full advantage of this feature. quit same as exit. repeat repeats cmd forever (^C to interrupt). Useful for example if you use a remote script invoking "sz" and you don't want to be typing "rz" each time... Remember however that several files can be transferred by a single sz/rz pair so this is not usually necessary to use repeat. rz Receive files from the remote machine. runs rz and plugs the process on the ssh connection. running sz on the REMOTE machine is required : 1) run `sz <remote_file> ...' from the remote machine shell 2) press the escape sequence (C-space) to enter file transfer mode 3) run the `rz' builtin suspend suspend zssh (back to the local machine shell) sz <file> ... Send files to the remote machine. runs sz and plugs the process on the ssh connection. There is no need to manually run rz on the remote side. version print version information builtins rz , sz , hook and exit return to shell mode after completion. OPTIONS
-f --force Do not ask user any question -h --help show basic help -s cmd --shell cmd run cmd as remote shell instead of the default "ssh -e none" (zssh) or "telnet -8 -E" (ztelnet) ex: zssh -s "rsh -x" -V --version show version -z ^X --zssh-escape ^X set escape sequence to ^X -- may be used to separate zssh options from ssh ones Other arguments are passed verbatim to ssh/telnet/whatever. ENVIRONMENT
ZSSHESCAPE Setting the ZSSHESCAPE environment variable allows to override the default escape sequence. ZSSHESCAPE should contain only two characters of the form `^X', meaning that ^X is to be the new escape sequence. REQUIREMENTS
the following binaries need to be properly installed for zssh to work : ssh/telnet/... the remote shell to be executed (local machine) sz rz zmodem send and receive programs. Should be both on local and remote machine, and (hopefully) of compatible versions. TIPS
If file transfer is initiated but never completes ( ie a line like : Bytes Sent: 38144/4610624 BPS:3424 ETA 22:15 or Bytes Sent: 0/ 513 BPS:0 ETA 00:00 Retry 0: Got ZCAN can be seen, but transfer never completes ) Chances are the pty/tty on one of the systems are not 8-bit clean. (Linux is 8-bit clean, NetBSD is not). Using the -e (escape) option of rz should solve this problem. Transfers can be interrupted with ^C (somewhat experimental =) If you get stuck in rz/sz (for example you've just ran rz, but you then decided not to transmit anything), hit a dozen ^X (Ctrl-X, not the zssh escape!) to stop it Use `sz -y <files>' to overwrite files on the other side BUGS
/ LIMITATIONS You may sometimes have to hit return 2 or 3 times after file transfer completion in order get back to the shell. Some digits are usually displayed; don't worry it won't harm (you or your term) ... the tty may (sometimes) be somewhat upset after an interrupted transfer ( using ^C ). typing `reset' in this case should help. no pipe, redirection (and other stuff) support in shell ... but after all there are already wonderful shells around =) CREDITS
ttssh's author - Robert O'Callahan - for the original idea The sourceforge team. AUTHOR
Matthieu Lucotte <gounter@users.sourceforge.net> zssh homepage: http://zssh.sourceforge.net SEE ALSO
ssh(1), telnet(1), scp(1), sz(1), rz(1), readline(3), ZSSH
June 26, 2000 ZSSH(1)
All times are GMT -4. The time now is 09:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy