Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using SSh between Linux Servers and Cygwin client 1

Status
Not open for further replies.

naveenrt

Technical User
Mar 23, 2001
53
US
Hi All
I have a Linux Server ( Used as SSH Server) and cygwin running on a windows 2003 Server ( used as a SSH client)

I need to execute commands on Linux servers using ssh from cygwin command prompts

Can anyone guide me on how to setup the same .

Thanks and regards
Naveen
 
1.) Start sshd running on linux box (probably already is)
2.) Make sure port 22 is open on the server side
3.) Install ssh package (and maybe X11) for Cygwin
4.) Start Cygwin
5.) If you want to use XWindows programs from the server on Windows (you'll need the X11 packages mentioned in 3), type
[red]startx[/red] in the terminal window -- any thing else to be typed will be in the new xterm window that opens following startx
6.) [red]ssh[/red] [green]user[/green][red]@[/red][green]server[/green] if you're not using X11, otherwise [red]ssh -X[/red] [green]user[/green][red]@[/red][green]server[/green] will gie you X forwarding as well. [green]user[/green] is any user, except root, who has ssh permission, and [green]server[/green] is the Linux box running the ssh server.

There you go.

[plug=shameless]
[/plug]
 
Hi
Thanks Jstriech. Actually i need to automate few tasks and want the client to be configured for Automatic login .

For example to run certain automation jobs . It should not prompt me for password .

I followed the instruction as below
1) on Linux server i logged in as the user for which the automation needs to be done .. say for ex tomcat
2) while logged in as tomcat generated keys using
ssh-keygen -t rsa on linux server
3) this generated two keys id_rsa.pub and id_rsa
4) I copied the id_rsa.pub as authorized_keys2 (tried with authorized_keys also) to the home directory of user tomcat ( /home/tomcat/.ssh/authorized_keys2) under cygwin in windows
5) tried to login using ssh tomcat@linuxsvr
6) It still aks me for password

I also checked the /etc/ssh/sshd_config parameters on linux and the parameters are enabled

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

Does any one have any ideas here

Thanks for your help in advance
 
Hi
I figured out what the problem is . Its basically permission that is set on the linux server . I changed it to following

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

Thought i would share my finding

Cheers
Naveen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top