SSH issue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SSH issue
# 1  
Old 02-10-2011
SSH issue

I want to run a program on remote server by using unauthenticated ssh. It works when I ssh from command line however, it does not work when I try to invoke ssh script with other application. Any clue?
# 2  
Old 02-10-2011
When you call ssh or rsh or rexec or remsh with a command, there is no .profile run to build up environment, so invoke an environment script explicitly. Also, there is no tty, but that is less often the problem. Sometimes it is easiest to just invoke a shell, and send all the environment and commands down the pipe to it.
# 3  
Old 02-10-2011
Thanks! "invoke an environment script explicitly? Do I have invoke env. script within the script that is using ssh ...?
# 4  
Old 02-11-2011
Code:
 
echo '. ./.profile
...
' | ssh user_id@host_or_ip ksh

# 5  
Old 02-11-2011
Thanks! I have unauthencticated SSH between these servers and tried this but did not work. Still complaining "can not open a file" which is already in the user path.
# 6  
Old 02-11-2011
Well, sometimes you can use strace/truss/tusc to see what is happening, exactly. However, it tends to balk around set-uid and such. Make sure you are who you think you are, and where you think you are, or use an absolute path.

If your group says yes but your id says no, it is no, which some find surprising. More detail would help (id, ls -l, commands).
# 7  
Old 02-11-2011
when I used absolute path, I am getting following error

TERM: Undefined variable
TERM: Undefined variable.
/usr/bin/.: Permission denied.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Ssh issue

Hi All, I am trying to connect between two system , I am facing the issue with -SSH-t-l userid systemname exit ( this is the syntax) It suppose to ask for password , but it throws the error as mentioned below Error is received disconnect from system and remote login for the... (1 Reply)
Discussion started by: sudhainit
1 Replies

2. UNIX for Beginners Questions & Answers

Issue with SSH key

Hello All , I am trying to set up the keys to login seamless on to two diff environment server(s). i used to have it couple of years back , but somehow never worked and didn`t concentte much , but when i want to setup again . facing a challange while copying the id_rsa.pubfile to... (4 Replies)
Discussion started by: radha254
4 Replies

3. Solaris

SSH issue

Hi guys. I just installed Solaris 10 and want to enable ssh on it So that i can remotely use it from another location. I read a post on this forum an it was written that SSH is enabled by default. I did a ps -ef | grep ssh and nothing showed up meaning that it isnt running. I even tried... (11 Replies)
Discussion started by: Junaid Subhani
11 Replies

4. Fedora

ssh issue

Hello, I have two computers at my desk, let's call them A and B. I have some tasks that can only be performed on one of them and some on the other, so I need to be able to ssh from one to the other and vice versa to transfer files, etc. A can ssh to B without problem: I even copied the public key... (6 Replies)
Discussion started by: Leo_Boon
6 Replies

5. UNIX for Advanced & Expert Users

ssh issue

Hi I have a annoying situation here . Our non prod server connect to informatica to run the work flow. But since yest some jobs are getting failed due ssh to informatica server been unsuccessfull. please look into this. successful log for job fiusdcacct_ios_price_venld: SSH... (2 Replies)
Discussion started by: ptappeta
2 Replies

6. Solaris

SSH issue

Facing a SSH issue while creating passwordless login. unix> ./create_ssh In the program, you will be asked and providing 1. SSH private key filename (twice) 2. key passcode (twice) Enter private key filename: id_ss81dev ld.so.1: ssh-keygen: fatal: relocation... (5 Replies)
Discussion started by: flinders1323
5 Replies

7. Solaris

SSH/Firewall issue

I am a complete UNIX neophyte with the unenviable task of trying to pseudo manage two SUN boxes with an unknown past. I was not responsible for setting them up, anything that was done on them previously, and have no means of figuring out anything that was done to them. So far I have changed the... (4 Replies)
Discussion started by: tawnos42
4 Replies

8. Solaris

ssh issue

I'm having a problem with an ssh server "SSH-2.0-Sun_SSH_1.1.2" on solaris 10. when i do try to connect from windows using puTTY the server refuse's the connection . when i try to connect using telnet from the same windows machine it accepts the connection and i got the following bannar... (32 Replies)
Discussion started by: h@foorsa.biz
32 Replies

9. UNIX for Advanced & Expert Users

An issue with SSH

Hey Guys! I got two PCs at my place. In the beginning, one of my PCs had RHEL3( say PC1 ) and one had RHEL4 ( say PC2 ). I was able to ssh from PC1 to PC2 and vice-versa. But recently I've upgraded PC1 from RHEL3 to RHEL4. Now when i am trying to ssh from PC2 to PC1, it is not allowing... (1 Reply)
Discussion started by: chakri.penguin
1 Replies

10. UNIX for Advanced & Expert Users

ssh issue

Im using the default ssh program on a solaris 9 system to connect to another server. When connecting to the other host it make me type my password in 3 to 4 times before letting me in. Is anyone familar with this? (4 Replies)
Discussion started by: meyersp
4 Replies
Login or Register to Ask a Question