LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-28-2013, 03:39 AM   #1
barathan
LQ Newbie
 
Registered: Jun 2012
Posts: 17

Rep: Reputation: Disabled
SSH from Linux to windows - Help Me!!


hi Guys,

just like how i ssh from one linux machine to another using ssh root@192.168.10.1, i would like to do the same thing from linux to connect to a windows machine. is this possible??

my goal is to scp log files from linux machine to windows machine.
mounting is not my option, as it has many flaws. could some one please help me.
 
Old 05-28-2013, 03:40 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
you need to install sshd on windows
 
Old 05-28-2013, 03:41 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
you'll need an SSH server then. the Cygwin project provides an openssh implementation which may well suit your needs.
 
Old 05-28-2013, 05:05 AM   #4
yogesh_attarde
Member
 
Registered: Jan 2010
Posts: 82

Rep: Reputation: 1
Just install the winscp (freeware) on your windows machine and you can copy files from Linux to windows from windows machine itself.

Below is the link for your referance.


Regards,
Yogesh
 
Old 05-28-2013, 05:07 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well note that he asked for linx TO windows, which winscp will NOT help with. However, it is often MUCH easier to change the requirements and use winscp.
 
Old 05-28-2013, 09:16 AM   #6
Genocide_Hoax
Member
 
Registered: Apr 2011
Distribution: OpenSuse 12.3 , Slackware 13.1 ; Centos 6.2 ; Fedora 14
Posts: 90

Rep: Reputation: 8
if you are on a network, and you want to transfer files , why don't you go for samba?
 
Old 05-28-2013, 09:28 AM   #7
barathan
LQ Newbie
 
Registered: Jun 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
hi all,

i have installed openssh in my windows pc. now, from my windows PC, i can SSH into my linux tester.
but from my linux tester, i can't SSH into my windows PC. im getting error such as " ssh: connect to host xxx port:22: connection refused "
anyone has experienced this before? is it because my windows PC is joined to a domain and my linux machine is not??

i dont want to use samba. i want to scp files from linux to windows
 
Old 05-28-2013, 10:11 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Well that could be that you've not opened up firewall services to port 22 on windows or an intermediate device, or the SSH service is not running.
 
Old 05-29-2013, 01:55 AM   #9
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
have you started/configured ssh server (daemon or service) ?
 
Old 05-29-2013, 09:15 AM   #10
barathan
LQ Newbie
 
Registered: Jun 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
hi guys.

well, i have installed FreeSSHD into my windows pc and got my sshd server running fine. my linux pc has the ssh server configured fine. so right now, what im experiencing is, from my linux pc, i issued this command to log into my windows PC : "ssh -Tv myuser.name@10.34.31.29"
and im getting below error

PNG-RND01:~ # ssh -Tv barathan.rajalingam@10.34.31.29
OpenSSH_5.4p1, OpenSSL 1.0.0 29 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 10.34.31.29 [10.34.31.29] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version WeOnlyDo 2.1.3
debug1: no match: WeOnlyDo 2.1.3
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host '10.34.31.29' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /root/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey
debug1: Trying private key: /root/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).
PNG-RND01:~ #


any idea why????
 
Old 05-29-2013, 11:40 AM   #11
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Did you copy the public key to the server? You are trying the use a key based authentication, but either the public key is missing, or is mismatched with the private key offered by the client. There are numerous online tutorials for setting up ssh keys.

--- rod.
 
  


Reply

Tags
ssh


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to chain proxies linux:linux:windows without ssh server on windows? vcguy Linux - Networking 2 05-12-2008 04:10 PM
How to chain proxies linux:linux:windows without ssh server on windows? vcguy Linux - Networking 1 04-13-2008 10:24 AM
Can't ssh from linux, but can from windows? Rotwang Linux - General 10 05-05-2006 04:40 PM
ssh windows to linux Longinus Linux - Networking 3 04-18-2004 11:44 AM


All times are GMT -5. The time now is 05:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration