Solaris 8 ssh issue - $SSH_ORIGINAL_COMMAND undefined variables


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris 8 ssh issue - $SSH_ORIGINAL_COMMAND undefined variables
# 8  
Old 02-16-2017
Quote:
Originally Posted by rbatte1
Your default shell on the Solaris server is tcsh, which might be causing the problem. Perhaps try this instead:-
Code:
ssh root@client1 "echo set | bash > /tmp/root.ssh.bash.set"


I must agree with RudiC too, a client connects to a server, not the other way around.


Robin
Thank you. This is root.ssh.bash.set
Code:
BASH=/usr/bin/bash
BASH_VERSINFO=([0]="2" [1]="03" [2]="0" [3]="1" [4]="release" [5]="sparc-sun-solaris")
BASH_VERSION='2.03.0(1)-release'
DIRSTACK=()
EUID=0
GROUP=other
GROUPS=()
HOME=/
HOST=client1
HOSTNAME=client1
HOSTTYPE=sparc
IFS='
'
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib
LOGNAME=root
MACHTYPE=sparc-sun-solaris
MAIL=/var/mail/root
MANPATH=/usr/local/man:/usr/man:/usr/openwin/man:/home7/SUNWspro/man
OPTERR=1
OPTIND=1
OSTYPE=solaris
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
PPID=15550
PS4='+ '
PWD=/
SHELL=/bin/tcsh
SHELLOPTS=braceexpand:hashall:interactive-comments
SHLVL=2
SSH_CLIENT='172.26.80.85 38186 22'
SSH_CONNECTION='172.26.80.85 38186 172.26.80.82 22'
TERM=dumb
TZ=Asia/Taipei
UID=0
USER=root
VENDOR=sun
_=bash

---------- Post updated at 05:36 PM ---------- Previous update was at 05:17 PM ----------

Quote:
Originally Posted by rbatte1
Your default shell on the Solaris server is tcsh, which might be causing the problem. Perhaps try this instead:-
Code:
ssh root@client1 "echo set | bash > /tmp/root.ssh.bash.set"


I must agree with RudiC too, a client connects to a server, not the other way around.


Robin
Thank you so much to remind me this!
After I changed default login shell of client1 root to bash, everything worked fine!

Also thanks to rbatte1 for giving me suggestions.Smilie

It seems like I have to prepare two shell scripts for bash and tcsh if I don't want to change default root shell.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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. 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

7. 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

8. 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

9. 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
Login or Register to Ask a Question