Sponsored Content
Operating Systems Solaris Solaris 8 ssh issue - $SSH_ORIGINAL_COMMAND undefined variables Post 302991749 by bestard on Thursday 16th of February 2017 03:32:04 AM
Old 02-16-2017
Quote:
Originally Posted by rbatte1
Can you take out the restriction again and run a simple remote command to list out the variables set into a file? Something like this might do:-
Code:
ssh root@client1 "env > /tmp/root.ssh.env ; set > /tmp/root.ssh.set"

Then sign in and have a look in the two files created to see if anything leaps out. I'm afraid that I don't have a Solaris server available to test this.


I hope that this helps,
Robin
Thanks for your suggestion. I wrote out two files as you said, but I can't see the key points. Would you give me some hints? Thanks.

root.ssh.env
Code:
USER=root
LOGNAME=root
HOME=/
PATH=.:/:/usr/openwin/bin/xview:/usr/openwin/bin:/sbin:/usr/sbin:/usr/ccs/bin:/usr/bin:/usr/ucb:/
bin:/usr/local:/usr/drac:/usr/local/bin:/usr/local/sbin
MAIL=/var/mail/root
SHELL=/bin/tcsh
TZ=Asia/Taipei
SSH_CLIENT=172.26.80.85 37543 22
SSH_CONNECTION=172.26.80.85 37543 172.26.80.82 22
HOSTTYPE=sun4
VENDOR=sun
OSTYPE=solaris
MACHTYPE=sparc
SHLVL=1
PWD=/
GROUP=other
HOST=client1
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib
MANPATH=/usr/local/man:/usr/man:/usr/openwin/man:/home7/SUNWspro/man

root.ssh.set
Code:
addsuffix       
argv    ()
command env > /tmp/root.ssh.env; set > /tmp/root.ssh.set
cwd     /
dirstack        /
echo_style      bsd
gid     1
group   other
history 80
home    /
ignoreeof       
lpath   (/usr/openwin/bin/xview /usr/openwin/bin)
mychoice        openwin
noclobber       
owd     
path    (. / /usr/openwin/bin/xview /usr/openwin/bin /sbin /usr/sbin /usr/ccs/bin /usr/bin /usr/u
cb /bin /usr/local /usr/drac /usr/local/bin /usr/local/sbin)
prompt  client1.root{~ }# 
shell   /bin/tcsh
shlvl   1
status  0
tcsh    6.10.00
tty     
uid     0
user    root
version tcsh 6.10.00 (Astron) 2000-11-19 (sparc-sun-solaris) options 8b,nls,dl,al,rh,color

 

9 More Discussions You Might Find Interesting

1. Solaris

trouble auto connecting ssh 3.6.1 (Solaris 8) to ssh 3.0.1 (Solaris 6)

I am currently setting up rdiff-backup to use ssh to connect and remotely backup and retrieve data. I am doing so by creating rsa keys for each server and copying the relevant key to the /.ssh folder on the relevant server. All seems to work well when severs running solaris 8 with ssh 3.6.1 are... (6 Replies)
Discussion started by: falklandtim
6 Replies

2. Shell Programming and Scripting

Using variables in SSH

Please tell me what is wrong in the following shell script. #!/bin/sh DATE1=`date -d "yesterday" +"%Y-%m-%d"` ssh ftwplapp01 << EOF echo "Date is :" $DATE1 > /tmp/testfile cd /app/was6/AppServer/logs/prod_ebp_live/ebp tar cvf /app/was6/AppServer/logs/prod_ebp_live_applogs_$DATE1.tar `find... (1 Reply)
Discussion started by: tsryn
1 Replies

3. Shell Programming and Scripting

variables inside an ssh session

Hello all, I would like to declare and use variables inside an ssh session. I have the feeling that it's not possible. Here is the situtation simpified: #:/bin/sh test="salut" echo $test ssh hudson@10.41.21.99 <<EOF export testssh="salut" echo testssh=$testssh ... (4 Replies)
Discussion started by: Lotfus
4 Replies

4. Solaris

Solaris 8 ssh public key authentication issue - Server refused our key

Hi, I've used the following way to set ssh public key authentication and it is working fine on Solaris 10, RedHat Linux and SuSE Linux servers without any problem. But I got error 'Server refused our key' on Solaris 8 system. Solaris 8 uses SSH2 too. Why? Please help. Thanks. ... (1 Reply)
Discussion started by: aixlover
1 Replies

5. Cybersecurity

SSH password-less login issue between linux and solaris

Hello Gurus, I am trying to set up bidirectional password-less login between a linux and a Solaris. The way I am doing is very simple, which is creating pub/priv key pairs on each host and add the pub key to each other's authorized_keys file: ssh-keygen -t rsa (I tried dsa, and it didn't work... (4 Replies)
Discussion started by: error_lee
4 Replies

6. UNIX for Dummies Questions & Answers

Solaris 11.2 / OSX 10.9.5 SSH issue

I could use a fresh pair of eyes to look at this, because it has me baffled. I am attempting to setup pasword-less ssh keys (rsa) between 2 systems. As the user (admin on both systems), I have generated the keys on both the Solaris 11 and the OSX systems and using the cat command, I have copied the... (3 Replies)
Discussion started by: SmokeyJoe
3 Replies

7. Shell Programming and Scripting

ksh - keep argument variables after ssh

i have a script that should ssh to different host/server. See below: ./script.ksh var1 var2 var3 case $ser in ser1) depo='appr1' set -A aprrA aprrB ssh ser2 "/home/dir/script.ksh $1 $2 $3" ssh ser3 "/home/dir/script.ksh $1 $2 $3" ssh ser4... (4 Replies)
Discussion started by: erin00
4 Replies

8. Shell Programming and Scripting

How to Simulate parallel-ssh with variables ??

alias n-001='ssh hst-net-001' alias n-002='ssh hst-net-002' alias n-003='ssh hst-net-003' alias n-004='ssh hst-net-004' alias p-001='ssh hst-proxy-001' alias p-002='ssh hst-proxy-002' alias p-003='ssh hst-proxy-003' alias p-004='ssh hst-proxy-004'... (0 Replies)
Discussion started by: lohith.dutta
0 Replies

9. 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
getusershell(3C)					   Standard C Library Functions 					  getusershell(3C)

NAME
getusershell, setusershell, endusershell - get legal user shells SYNOPSIS
#include <unistd.h> char *getusershell(void); void setusershell(void); void endusershell(void); DESCRIPTION
The getusershell() function returns a pointer to a legal user shell as defined by the system manager in the file /etc/shells. If /etc/shells does not exist, the following locations of the standard system shells are used in its place: /bin/bash /bin/csh /bin/jsh /bin/ksh /bin/pfcsh /bin/pfksh /bin/pfsh /bin/sh /bin/tcsh /bin/zsh /sbin/jsh /sbin/pfsh /sbin/sh /usr/bin/bash /usr/bin/csh /usr/bin/jsh /usr/bin/ksh /usr/bin/pfcsh /usr/bin/pfksh /usr/bin/pfsh /usr/bin/sh /usr/bin/tcsh /usr/bin/zsh /usr/xpg4/bin/sh The getusershell() function opens the file /etc/shells, if it exists, and returns the next entry in the list of shells. The setusershell() function rewinds the file or the list. The endusershell() function closes the file, frees any memory used by getusershell() and setusershell(), and rewinds the file /etc/shells. RETURN VALUES
The getusershell() function returns a null pointer on EOF. BUGS
All information is contained in memory that may be freed with a call to endusershell(), so it must be copied if it is to be saved. SunOS 5.10 30 Aug 2004 getusershell(3C)
All times are GMT -4. The time now is 09:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy