Sponsored Content
Full Discussion: Error in SSH output.
Top Forums Shell Programming and Scripting Error in SSH output. Post 302949444 by Don Cragun on Friday 10th of July 2015 03:29:20 PM
Old 07-10-2015
OK. We don't see the error when you run other commands on that server. So, that leaves us the assumption that the shell script /gci/support/bin/BonyCash.ksh on the server nygsmartp01 is incorrectly invoking tset or invoking something else that is incorrectly invoking tset.

Have you tried using the ssh -t option as RudiC suggested?

Do you think we can guess at what is wrong with the way you're using tset if you won't show us how you're using tset? Our crystal balls aren't nearly as clear as your crystal ball. You can look at /gci/support/bin/BonyCash.ksh on nygsmartp01 in your crystal ball and show it to us (and then we can try to help you fix it); or you can continue to refuse to show us how tset is invoked and not tell us what terminal characteristics you're are trying to set with it (and you're on your own to fix it). Your choice.
 

10 More Discussions You Might Find Interesting

1. BSD

DF output via SSH

I'm trying to understand what is happening. The "setup". System running OpenBSD 3.3 Connect to the system using PuTTy or with the SSH.COM SSH client, issue a DF command. First line that comes back is: Filesystem 1K-blocks Used Avail Capacity Mounted on When I connect the the... (13 Replies)
Discussion started by: woodstone
13 Replies

2. Shell Programming and Scripting

Script that Redirect SSH output via cron

Hi, I have a script that's being called via a crontab which is a wrapper script that creates a log for the script that gets executed. Within the script that gets executed, it also run's subscripts. I've been able to get everything to work .. but the issue is one of the subscript that goes out... (4 Replies)
Discussion started by: primp
4 Replies

3. Shell Programming and Scripting

Piped output from SSH tunnel hangs?

Hi All, When starting an SSH tunnel, piped output 'hangs' (on AIX) : ssh -Nf -Llocalhost:22000:server:22 proxy | cat -vet - ... hangs ... Does anybody know how to prevent this? Of course, in my script I don't use the tunnel as I do in the example above. In my script the call to ssh is... (7 Replies)
Discussion started by: whbos
7 Replies

4. Shell Programming and Scripting

how to format ssh top output

Hello; Am trying to generate runaway proc report using ssh thusly: =================== ssh -t -t $BOX 'TERMINAL="vt100" top -d1 -h -n 10' >> $FILE . . cat $FILE | mail -s "Latest Top `date`" $MAIL_TO ==================== But the output to e-mail comes out rather garbled .. Any ideas... (1 Reply)
Discussion started by: delphys
1 Replies

5. Shell Programming and Scripting

Weird tail output over ssh

Hello; Am trying to correct the formatting of tail output over ssh. Using the following code: echo "" > $FILE for BOX in $SERVERS do echo "Processing on $BOX" |tee -a $FILE echo "===============================" >> $FILE sudo ssh $BOX 'TERMINAL="vt100" /usr/bin/sh -s' <... (2 Replies)
Discussion started by: delphys
2 Replies

6. Shell Programming and Scripting

Seeing output of command over ssh

Hey Guys, i have a script that generates logs at our isilon storage. The part of the script is to geneate logs and grep its name: VAR=`ssh -o UserKnownHostsFile=/dev/null root@XXX isi_gather_info | grep -i "Package:" | awk '{ print $2 }'` Now , while this is run, i do not see the status of... (2 Replies)
Discussion started by: anshulsahdev
2 Replies

7. Shell Programming and Scripting

SSH - remote output locally

The code below works ok, however; I need to output the results to a local variable the_path="/mnt/back/hang" ssh -T -i /home/buddy/.ssh/id_rsa buddy@ginger << EOF find ${the_path} -name "*.jpg" | wc -l > ## output to local variable exit EOF (3 Replies)
Discussion started by: squrcles
3 Replies

8. Shell Programming and Scripting

Getting SSH Output From Remote to Local Session?

Hi everyone, after about 2 days of scratching my head on this one, I'm finally ready to punt this and ask for some actual help. Here's the situation. We have 1 server, that runs multiple VM's. To gain access to those VM's we ssh from host01 to the other vm hosts. For example when we first log... (4 Replies)
Discussion started by: Lost in Cyberia
4 Replies

9. Shell Programming and Scripting

Ssh output

Hi, I need to get the output of ssh for multiple servers using for loop which is returning how many users are logged in, one below the other. But i'm getting output in single line for one of the servers. XXXX pts/0 Oct 18 08:45 abcd pts/3 Oct 18 06:46 abcde pts/4 Oct 18 06:46 xyzqw pts/5 Oct 18... (14 Replies)
Discussion started by: sam_bd
14 Replies

10. Shell Programming and Scripting

Read several variables from command output via SSH

Hi Folks, I'm currently trying to read several values into different variables. Actually, what I'm doing works, but I get an error message. My attempts are: read strCPROC strIPROC strAPROC <<<$(ssh -n -T hscroot@$HMC "lshwres -r proc -m $strIDENT --level sys -F \"configurable_sys_proc_units... (11 Replies)
Discussion started by: NKaede
11 Replies
tset(1) 						      General Commands Manual							   tset(1)

NAME
tset, reset - terminal initialization SYNOPSIS
tset [-IQVqrs] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal] reset [-IQVqrs] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal] DESCRIPTION
Tset initializes terminals. Tset first determines the type of terminal that you are using. This determination is done as follows, using the first terminal type found. 1. The terminal argument specified on the command line. 2. The value of the TERM environmental variable. 3. (BSD systems only.) The terminal type associated with the standard error output device in the /etc/ttys file. (On Linux and System-V- like UNIXes, getty does this job by setting TERM according to the type passed to it by /etc/inittab.) 4. The default terminal type, ``unknown''. If the terminal type was not specified on the command-line, the -m option mappings are then applied (see below for more information). Then, if the terminal type begins with a question mark (``?''), the user is prompted for confirmation of the terminal type. An empty response confirms the type, or, another type can be entered to specify a new type. Once the terminal type has been determined, the ter- minfo entry for the terminal is retrieved. If no terminfo entry is found for the type, the user is prompted for another terminal type. Once the terminfo entry is retrieved, the window size, backspace, interrupt and line kill characters (among many other things) are set and the terminal and tab initialization strings are sent to the standard error output. Finally, if the erase, interrupt and line kill charac- ters have changed, or are not set to their default values, their values are displayed to the standard error output. When invoked as reset, tset sets cooked and echo modes, turns off cbreak and raw modes, turns on newline translation and resets any unset special characters to their default values before doing the terminal initialization described above. This is useful after a program dies leaving a terminal in an abnormal state. Note, you may have to type <LF>reset<LF> (the line-feed character is normally control-J) to get the terminal to work, as carriage-return may no longer work in the abnormal state. Also, the terminal will often not echo the command. The options are as follows: -q The terminal type is displayed to the standard output, and the terminal is not initialized in any way. The option `-' by itself is equivalent but archaic. -e Set the erase character to ch. -I Do not send the terminal or tab initialization strings to the terminal. -Q Don't display any values for the erase, interrupt and line kill characters. -V reports the version of ncurses which was used in this program, and exits. -i Set the interrupt character to ch. -k Set the line kill character to ch. -m Specify a mapping from a port type to a terminal. See below for more information. -r Print the terminal type to the standard error output. -s Print the sequence of shell commands to initialize the environment variable TERM to the standard output. See the section below on setting the environment for details. The arguments for the -e, -i, and -k options may either be entered as actual characters or by using the `hat' notation, i.e. control-h may be specified as ``^H'' or ``^h''. SETTING THE ENVIRONMENT
It is often desirable to enter the terminal type and information about the terminal's capabilities into the shell's environment. This is done using the -s option. When the -s option is specified, the commands to enter the information into the shell's environment are written to the standard output. If the SHELL environmental variable ends in ``csh'', the commands are for csh, otherwise, they are for sh. Note, the csh commands set and unset the shell variable noglob, leaving it unset. The following line in the .login or .profile files will initialize the environment cor- rectly: eval `tset -s options ... ` TERMINAL TYPE MAPPING
When the terminal is not hardwired into the system (or the current system information is incorrect) the terminal type derived from the /etc/ttys file or the TERM environmental variable is often something generic like network, dialup, or unknown. When tset is used in a startup script it is often desirable to provide information about the type of terminal used on such ports. The purpose of the -m option is to map from some set of conditions to a terminal type, that is, to tell tset ``If I'm on this port at a particular speed, guess that I'm on that kind of terminal''. The argument to the -m option consists of an optional port type, an optional operator, an optional baud rate specification, an optional colon (``:'') character and a terminal type. The port type is a string (delimited by either the operator or the colon character). The operator may be any combination of ``>'', ``<'', ``@'', and ``!''; ``>'' means greater than, ``<'' means less than, ``@'' means equal to and ``!'' inverts the sense of the test. The baud rate is specified as a number and is compared with the speed of the standard error out- put (which should be the control terminal). The terminal type is a string. If the terminal type is not specified on the command line, the -m mappings are applied to the terminal type. If the port type and baud rate match the mapping, the terminal type specified in the mapping replaces the current type. If more than one mapping is specified, the first applicable mapping is used. For example, consider the following mapping: dialup>9600:vt100. The port type is dialup , the operator is >, the baud rate specification is 9600, and the terminal type is vt100. The result of this mapping is to specify that if the terminal type is dialup, and the baud rate is greater than 9600 baud, a terminal type of vt100 will be used. If no baud rate is specified, the terminal type will match any baud rate. If no port type is specified, the terminal type will match any port type. For example, -m dialup:vt100 -m :?xterm will cause any dialup port, regardless of baud rate, to match the terminal type vt100, and any non-dialup port type to match the terminal type ?xterm. Note, because of the leading question mark, the user will be queried on a default port as to whether they are actually using an xterm terminal. No whitespace characters are permitted in the -m option argument. Also, to avoid problems with meta-characters, it is suggested that the entire -m option argument be placed within single quote characters, and that csh users insert a backslash character (``'') before any exclamation marks (``!''). HISTORY
The tset command appeared in BSD 3.0. The ncurses implementation was lightly adapted from the 4.4BSD sources for a terminfo environment by Eric S. Raymond <esr@snark.thyrsus.com>. COMPATIBILITY
The tset utility has been provided for backward-compatibility with BSD environments (under most modern UNIXes, /etc/inittab and getty(1) can set TERM appropriately for each dial-up line; this obviates what was tset's most important use). This implementation behaves like 4.4BSD tset, with a few exceptions specified here. The -S option of BSD tset no longer works; it prints an error message to stderr and dies. The -s option only sets TERM, not TERMCAP. Both these changes are because the TERMCAP variable is no longer supported under terminfo-based ncurses, which makes tset -S useless (we made it die noisily rather than silently induce lossage). There was an undocumented 4.4BSD feature that invoking tset via a link named `TSET` (or via any other name beginning with an upper-case letter) set the terminal to use upper-case only. This feature has been omitted. The -A, -E, -h, -u and -v options were deleted from the tset utility in 4.4BSD. None of them were documented in 4.3BSD and all are of lim- ited utility at best. The -a, -d, and -p options are similarly not documented or useful, but were retained as they appear to be in wide- spread use. It is strongly recommended that any usage of these three options be changed to use the -m option instead. The -n option remains, but has no effect. The -adnp options are therefore omitted from the usage summary above. It is still permissible to specify the -e, -i, and -k options without arguments, although it is strongly recommended that such usage be fixed to explicitly specify the character. As of 4.4BSD, executing tset as reset no longer implies the -Q option. Also, the interaction between the - option and the terminal argu- ment in some historic implementations of tset has been removed. ENVIRONMENT
The tset command uses the SHELL and TERM environment variables. FILES
/etc/ttys system port name to terminal type mapping database (BSD versions only). /usr/share/terminfo terminal capability database SEE ALSO
csh(1), sh(1), stty(1), tty(4), termcap(5), ttys(5), environ(7) tset(1)
All times are GMT -4. The time now is 09:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy