SSH in Command Line

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
eyalush
Participant
Posts: 8
Joined: Tue Jul 27, 2004 1:31 am

SSH in Command Line

Post by eyalush »

Hi There, :lol: :?: :o

I'm working with 7.5.1.a on Win 2003.
We are trying to run a shell command on a remote Linux server,
We install an Open SSH and copied the Key between the servers and when I use a cmd line on the DS server and it works fine (the command is: "ssh etl01@rotemtest /home/etl01/etl.sh") it runs a ls -l command.

BUT, when I run a DS JOB from the same server as a command stage or Execute command on Seq or a before job subroutine it get stuck in the same place and can't be stopped.
When I look on the Process I can see that it started a SSH.exe Process and That it stuck and preventing the DS to finish.

I think that It some how connected to the user that runs the JOB but I don't know how to fix the Problem.....

Does anyone know the Answer?

Eyal
manojkumarnayak
Participant
Posts: 21
Joined: Fri Nov 04, 2005 11:31 am

Re: SSH in Command Line

Post by manojkumarnayak »

r u giving all the parameters right like server name , user id & password .
All value are case sensitive.


regards
manoj
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi Eyal and Welcome aboard :)

As far as I recall you need to configure something or invoke it with a full path to make it work via command stage.
Contact one of our guys at "Sherutei Briut Clalit" and ask how they used the SFU pack for windows on their server.

I recall it had also similar issues in the beginning.

Did you compare the environment between the command line you use in a cmd window and the one showing in the job log entry?

:idea: I know of cases where the only thing that worked was using a filter command in a sequential file stage to run the command, so try that as well.

Do post back your findings.
(Or I'll hunt your cell phone for a while j/k ;))

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
eyalush
Participant
Posts: 8
Joined: Tue Jul 27, 2004 1:31 am

RE:

Post by eyalush »

Well, :roll: :?:

I checked the ENV between DS JOB ( in the Director the Environment variable settings against the Windows ENV cmd:>"SET" ),

This is the Results:
DS JOB ENV:
USER=CAMPUS\e069515
USERPROFILE=C:\Documents and Settings\Default User
WINDOWS ENV:
USERNAME=e069515
USERPROFILE=C:\Documents and Settings\e069515

I think that this is the Problem ...to run a SSH from the same USER PROFILE ...does anyone knows or have another solution?

Thanks,
Eyal R
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Post by Amos.Rosmarin »

Hi,


The command hangs because it prompts and it is waiting for your answer.
You should use a routine that simulates the process (look at the ftp routine as an example).

Once you'll manage to do the first handshake you will be able to use this without pwd



Amos
Post Reply