mansur_mca
asked on
How to call UNIX ssh command from the windows XP ?
My requirement is
-have to use ssh utility in win xp environment to call the shell script resides on remote server for my automation ?
- what is option in ssh command to pass the pwd of user to avoid interactive mode ?
Please give the step wise instruction,how should I need to configure client PC to call SSH?
thanks for all in advance
-have to use ssh utility in win xp environment to call the shell script resides on remote server for my automation ?
- what is option in ssh command to pass the pwd of user to avoid interactive mode ?
Please give the step wise instruction,how should I need to configure client PC to call SSH?
thanks for all in advance
well you could use putty...if you want to bypass user authentication you will have to use public keys for user authentication.
For you to be able to run shell scripts on a unix/linux system remotely from windows without entering password, you need to:
- have trust relation between the servers and your system
Here a link on how to make the trust:
http://www.astro.caltech.edu/~mbonati/WIRC/manual/DATARED/setting_up_no-password_ssh.html
http://waelchatila.com/2005/06/06/1118124232757.html
http://www.cvrti.utah.edu/~dustman/no-more-pw-ssh/
- use ssh client to connect (you need sshd to be running on the other servers - which is part of secure shell s/w)
ssh clients for windows include:
putty or winscp
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
http://winscp.net/eng/index.php
- if you use putty S/W, then from command line window and from the dir where putty is installed you can run
plink username@remoteserver "/path/to/command"
- have trust relation between the servers and your system
Here a link on how to make the trust:
http://www.astro.caltech.edu/~mbonati/WIRC/manual/DATARED/setting_up_no-password_ssh.html
http://waelchatila.com/2005/06/06/1118124232757.html
http://www.cvrti.utah.edu/~dustman/no-more-pw-ssh/
- use ssh client to connect (you need sshd to be running on the other servers - which is part of secure shell s/w)
ssh clients for windows include:
putty or winscp
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
http://winscp.net/eng/index.php
- if you use putty S/W, then from command line window and from the dir where putty is installed you can run
plink username@remoteserver "/path/to/command"
There are two main options.
1. Install putty and use the command line plink (as shown by omarfarid)
2. Install cygwin and use ssh just like you would on a Unix/Linux box.
1. Install putty and use the command line plink (as shown by omarfarid)
2. Install cygwin and use ssh just like you would on a Unix/Linux box.
Sorry, I used the wrong S/W name, as Tintin correctly mentioned, the other option is really sygwin and not wincp
Actually, it's cygwin not sygwin and winscp not wincp ;-)
Thanks Tintin for the corrections :)
I just got up from my sleep, so typos
I just got up from my sleep, so typos
Refer to this FAQ on how to set up a putty session without promptint you for the password every time:
http://www.unixwiz.net/techtips/putty-openssh.html
http://www.unixwiz.net/techtips/putty-openssh.html
ASKER
I want to use SSH utility from the windows command line , not from the putty utility. thanks to omer he catches for what I am looking for.
Dear Omer,
When I typed the commad it is coming with &.
d:\>ssh-keygen -t dsa -f .ssh/id_dsa
ssh-keygen' is not recognized as an internal or external command,
perable program or batch file.
It is coming when I try to execute the command. Could you please tell me
- how to set the path to execute successfully ?
- is there any need placing exe in path before executing above command in winXP client ?
Dear Omer,
When I typed the commad it is coming with &.
d:\>ssh-keygen -t dsa -f .ssh/id_dsa
ssh-keygen' is not recognized as an internal or external command,
perable program or batch file.
It is coming when I try to execute the command. Could you please tell me
- how to set the path to execute successfully ?
- is there any need placing exe in path before executing above command in winXP client ?
I think you need to be in the dir
C:\Program Files\PuTTY>
and run
.\puttygen
C:\Program Files\PuTTY>
and run
.\puttygen
Well, if you don't want to use putty, then go down the cygwin route.
Go to http://www.cygwin.com/ and download the cygwin installer. When you select the packages to install, make sure you check the openssh client package.
Go to http://www.cygwin.com/ and download the cygwin installer. When you select the packages to install, make sure you check the openssh client package.
ASKER
Dear omer ,
Much thanks to you. I am able to complete my task with the help of which ever the link that you have provided above to run shell script on the remote server from win-dos command line.
http://www.astro.caltech.edu/~mbonati/WIRC/manual/DATARED/setting_up_no-password_ssh.html.
but when I triggered the command SSH with relevent options from win-XP ,It asking for pwd being in interactive mode. I would like remove this dependency each time, as this I would like place as batch job part of other scripts.
For this I followed the instructions which are provided at the bottom above page to fill my requirement, but couldnt succeed. Please advise any other steps, should I need to take care to suite for my requirement.
In nutshell I would like to remove interactive mode of asking password when SSH command triggered from client to connect remote server
Much thanks to you. I am able to complete my task with the help of which ever the link that you have provided above to run shell script on the remote server from win-dos command line.
http://www.astro.caltech.edu/~mbonati/WIRC/manual/DATARED/setting_up_no-password_ssh.html.
but when I triggered the command SSH with relevent options from win-XP ,It asking for pwd being in interactive mode. I would like remove this dependency each time, as this I would like place as batch job part of other scripts.
For this I followed the instructions which are provided at the bottom above page to fill my requirement, but couldnt succeed. Please advise any other steps, should I need to take care to suite for my requirement.
In nutshell I would like to remove interactive mode of asking password when SSH command triggered from client to connect remote server
OK, I test something and come back to you, but which client you are testing with (Windows side)?
ASKER
thanks for ur patience
client - win XP
client - win XP
thank you Mansur,
I meant are you using putty or cygwin ?
I meant are you using putty or cygwin ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
dear Omerfred ,
Going with the PLINK really solves problem. but our corporate policy not approved using this.
thus ,Can you please advice the possibility same with SSH.
Going with the PLINK really solves problem. but our corporate policy not approved using this.
thus ,Can you please advice the possibility same with SSH.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
As Tintin said, the unix side will not change, what will change is the generation command on the windows side go to the client dir from the command line and run:
.\ssh-keygen2 -t dsa
the keys will be generated (path will be shown to you), then you need to copy the public key to the unix box with the same way.
.\ssh-keygen2 -t dsa
the keys will be generated (path will be shown to you), then you need to copy the public key to the unix box with the same way.
ASKER
dear omer ,tintin,
It is Great !! much thanks to both u people, as tintin said copy of the file content *pub to server key file works .
As omer, the links provided given me the strong foundation in understanding the things .
Thanks for ur patience .. keep this going
It is Great !! much thanks to both u people, as tintin said copy of the file content *pub to server key file works .
As omer, the links provided given me the strong foundation in understanding the things .
Thanks for ur patience .. keep this going