Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to transfer files from windows-box to linux-box
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
JukkaR
n00b
n00b


Joined: 02 Aug 2002
Posts: 61
Location: Finland

PostPosted: Wed Aug 28, 2002 2:23 pm    Post subject: How to transfer files from windows-box to linux-box Reply with quote

I have all my mp3's on my windows-bx and I would like to transfer them to computer using Gentoo Linux. Computers are connected via hub (manufactured by Askey). Both computers have Realtek network cards (driver module: 8139too). There's a network of three computers, it's some kind of windows-network. Internet works normally through the hub, there's adsl modem net connection.
Back to top
View user's profile Send private message
rickysilk
n00b
n00b


Joined: 16 Aug 2002
Posts: 11

PostPosted: Wed Aug 28, 2002 2:28 pm    Post subject: samba Reply with quote

You'll want to emerge samba on your linux box.

http://www.samba.org/
_________________
RickySilk
Kung Foo | let us waste your time
Back to top
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Wed Aug 28, 2002 2:31 pm    Post subject: Reply with quote

Or if don't want to emerge samba you could just scp. Probably download Putty's pscp for windows and then:

pscp -r <mp3 dir> <username>@<linuxboxname>:<destination>

But emerging samba and using it like a writable windows share would be easier.
Back to top
View user's profile Send private message
JukkaR
n00b
n00b


Joined: 02 Aug 2002
Posts: 61
Location: Finland

PostPosted: Wed Aug 28, 2002 3:49 pm    Post subject: Reply with quote

rizzo wrote:
Or if don't want to emerge samba you could just scp. Probably download Putty's pscp for windows and then:

pscp -r <mp3 dir> <username>@<linuxboxname>:<destination>

But emerging samba and using it like a writable windows share would be easier.


I downloaded pscp, but when I'm trying to transfer files, it ask for root's password.. (I have only root account on my linux).. When I type the password, it asks it again - for seven times, then it stops. No files were transfered.

Now, do I have to compile something to kernel - again.. I'm getting a bit bored for such things...
Back to top
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Wed Aug 28, 2002 3:54 pm    Post subject: Reply with quote

Do you allow remote root logins? Check your /etc/ssh/sshd_config for the line that says "PermitRootLogin". I think it defaults to yes, but that is something to check.
Back to top
View user's profile Send private message
JukkaR
n00b
n00b


Joined: 02 Aug 2002
Posts: 61
Location: Finland

PostPosted: Wed Aug 28, 2002 4:01 pm    Post subject: Reply with quote

rizzo wrote:
Do you allow remote root logins? Check your /etc/ssh/sshd_config for the line that says "PermitRootLogin". I think it defaults to yes, but that is something to check.


It was yes but it was commented. Ok, I uncommented - didn't work.
Back to top
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Wed Aug 28, 2002 4:02 pm    Post subject: Reply with quote

Hmm then the only thing I can suggest is that you were entering the incorrect password. Check caps lock etc.

You shouldn't need to do any kernel changes for this, so don't worry there.
Back to top
View user's profile Send private message
n0n
Guru
Guru


Joined: 13 Jun 2002
Posts: 355

PostPosted: Wed Aug 28, 2002 4:14 pm    Post subject: Reply with quote

I'd create a user account on the box to see if that works . . . (Edit: Here I originally said "make sure the user is in the 'wheel' group otherwise it won't work," but I was wrong because I had that confused with another problem. Apologies.)

Also, I've had problems with pscp occasionally. A better solution, methinks, is to load up the Cygwin project on your Windoze box, at http://sources.redhat.com/cygwin. Basically, it's a port of a LOT of GNU and open-source software to Windows, so you can actually use bash in an xterm on Windows, compile programs with gcc, and (here's the important bit for this discussion) use OpenSSH. And I'd use OpenSSH if I were you. The first thing I do when I have to work on a windoze box is install Cygwin, and then I feel right at home.


Last edited by n0n on Wed Aug 28, 2002 7:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
n0n
Guru
Guru


Joined: 13 Jun 2002
Posts: 355

PostPosted: Wed Aug 28, 2002 4:23 pm    Post subject: Reply with quote

Ah, I am reminded after reading this topic of another thing that might be going on here. In the file /etc/passwd, the last field defines the user's shell. On the default Gentoo installation, if I remember correctly (it's been some time), this field is left blank, which ordinarily isn't a problem, because it'll just start you up with that shell. But SSH requires that you have an entry in there. So I'd check /etc/passwd and if "/bin/bash" isn't at the end of root's entry, add it.

(Still, you'd think that you'd get an error other than "Invalid password" if this were the case - but it's worth a look, anyway.)
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7731
Location: Underworld

PostPosted: Wed Aug 28, 2002 5:13 pm    Post subject: restarted sshd? Reply with quote

Have you restarted sshd after that?

/etc/init.d/sshd restart

JukkaR wrote:
rizzo wrote:
Do you allow remote root logins? Check your /etc/ssh/sshd_config for the line that says "PermitRootLogin". I think it defaults to yes, but that is something to check.


It was yes but it was commented. Ok, I uncommented - didn't work.
Back to top
View user's profile Send private message
JukkaR
n00b
n00b


Joined: 02 Aug 2002
Posts: 61
Location: Finland

PostPosted: Wed Aug 28, 2002 6:38 pm    Post subject: Reply with quote

Now I tried samba... Everything gone perfectly until I had to enter my samba-password. Entered it and Windows prompted: "Salasanasi on väärä. Yritä uudelleen", - Your password is wrong. Try again. I tried, with and without encrypted password -option in smb.conf, tried root's password - nothing. Well, atleast Windows-box now notices that theres Localhost connected in the network.. Do I have to buy cds and burn the damn mp3s and get them to the other computer that way...

In the /etc/passwd -file I checked that there was bash defined - was.

Does pscp even work with OpenSSH 3.4 ? On my computer, ssh isn't started automatically at boot. I have to type /etc/init.d/sshd start .

BTW, now I get this kind of error using pscp:
Fatal: ssh_init: Network error: Connection refused
- Atleast something new.....

Is there any program for linux that could connect to the network, since programs in Windows are not accepting my passwords..
Back to top
View user's profile Send private message
n0n
Guru
Guru


Joined: 13 Jun 2002
Posts: 355

PostPosted: Wed Aug 28, 2002 7:12 pm    Post subject: Reply with quote

JukkaR wrote:
I tried, with and without encrypted password -option in smb.conf, tried root's password - nothing.


Did you restart Samba inbetween changing those configuration options?

JukkaR wrote:
Does pscp even work with OpenSSH 3.4 ?


Yeah, I've done it. Both pscp and OpenSSH 3.4 speak SSH Protocol Version 2. Any SSH2-capable client would be able to talk to any SSH2-capable server. Both pscp and OpenSSH3.4 speak version 2.

JukkaR wrote:
On my computer, ssh isn't started automatically at boot. I have to type /etc/init.d/sshd start.


Run this command as root on your Linux box:
Code:
rc-update add sshd default

This will add "sshd" to the list of programs that get started at the "default" runlevel.

JukkaR wrote:
BTW, now I get this kind of error using pscp:
Fatal: ssh_init: Network error: Connection refused
- Atleast something new.....


That's interesting. To me, that says that SSHd isn't running on the box the way it should be. On the Linux box, do:
Code:
netstat -an | grep LISTEN
You should see a line that looks like this:
Code:
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN

Port 22 is what SSH listens on, and the * tells you that it's listening to anyone who cares to find it. If you don't see that line, then SSHd isn't actually listening. (Alternate methods of finding this out: emerge nmap, and then do "nmap localhost" - that's a port scanner that'll tell you what ports are open on your box, or do "fuser -vn tcp 22" which will tell you what process is using up port 22 on your box . . .)
Back to top
View user's profile Send private message
n0n
Guru
Guru


Joined: 13 Jun 2002
Posts: 355

PostPosted: Wed Aug 28, 2002 7:21 pm    Post subject: Reply with quote

I wrote:
Make sure that you add the user to the "wheel" group, otherwise they won't be able to log in . . .

Uh, no, I lose. The "wheel" thing is to allow users to su to root, not to log in with SSH. Just the thing with the /bin/bash applies here. Apologies about that.
Back to top
View user's profile Send private message
JukkaR
n00b
n00b


Joined: 02 Aug 2002
Posts: 61
Location: Finland

PostPosted: Wed Aug 28, 2002 7:25 pm    Post subject: Reply with quote

n0n wrote:
Did you restart Samba inbetween changing those configuration options?


Yes

n0n wrote:
That's interesting. To me, that says that SSHd isn't running on the box the way it should be. On the Linux box, do:
Code:
netstat -an | grep LISTEN
You should see a line that looks like this:
Code:
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN


I can see that line, and "fuser -vn tcp 22" gives line:
Code:
22/tcp         root            4232           f......            sshd
Back to top
View user's profile Send private message
n0n
Guru
Guru


Joined: 13 Jun 2002
Posts: 355

PostPosted: Wed Aug 28, 2002 7:38 pm    Post subject: Reply with quote

Hm. Well, here's some more ideas, then. Try doing an "iptables -L" to see if there's any rules blocking SSH traffic or something (probably you won't see anything there, though). I'm sure there are some port scanners available for Windows; perhaps try scanning your Linux box from there. Make sure you don't have any firewalls or something running on your Windows box (and if you do, make sure that's not what the problem is). Try ssh-ing into the box, instead of doing a file transfer - perhaps there's something wrong with just the file transfer side (use PuTTY or openssh via Cygwin to do that on Windows) . . .
Back to top
View user's profile Send private message
JukkaR
n00b
n00b


Joined: 02 Aug 2002
Posts: 61
Location: Finland

PostPosted: Thu Aug 29, 2002 12:53 pm    Post subject: Reply with quote

n0n wrote:
Try doing an "iptables -L" to see if there's any rules blocking SSH traffic or something (probably you won't see anything there, though).


Typed iptables -L and got this:

Code:
modprobe: Can't locate module ip_tables
iptables v1.2.6a: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.


Is there any program that could connect FROM linux TO windows. I would like to try it that way...
Back to top
View user's profile Send private message
n0n
Guru
Guru


Joined: 13 Jun 2002
Posts: 355

PostPosted: Thu Aug 29, 2002 1:39 pm    Post subject: Reply with quote

JukkaR wrote:
Code:
modprobe: Can't locate module ip_tables
iptables v1.2.6a: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

Okay, so you don't have iptables running, then, because the kernel modules don't exist. That can't be the problem, then.

JukkaR wrote:
Ok, seems that it's not possible to transfer files from windows to linux.. Maybe I should reinstall XP...


Of course it's possible to transfer files from windows to Linux. I do it all the time. You're probably just feeling a bit frustrated because you're working in a completely different environment than you're used to, and things don't work the way you might expect them too. Keep at it! Once you figure everything out, it's great.

Now, did you try the other suggestions I had? Perhaps if you could post a transcript of the failed file transfer session (ie: everything you see from the command prompt) would help.
Back to top
View user's profile Send private message
JukkaR
n00b
n00b


Joined: 02 Aug 2002
Posts: 61
Location: Finland

PostPosted: Thu Aug 29, 2002 1:53 pm    Post subject: Reply with quote

I'm not sure about the firewalls.. My target is not to connect the linux computer permanently to the network, I just have to transfer the mp3s and some other files to linux. I'm getting pretty sure however that the problem isn't in the linux, I think problem's in windows system. If I type
Code:
pscp -v c:\linux\*.* xyz@localhost.localdomain.com:/home
, it asks for xyz's password - my Linux-box hasn't user called 'xyz'. There's F-Secure Management Agent, Anti-Virus and BackWeb running on windows box. They can't be permanently stopped.
Back to top
View user's profile Send private message
n0n
Guru
Guru


Joined: 13 Jun 2002
Posts: 355

PostPosted: Thu Aug 29, 2002 2:03 pm    Post subject: Reply with quote

You said that you've only got the root user, right? Make sure you're using "root" instead of "xyz" in that case. I'd also recommend is simplifying the command line just a bit. Try something along these lines:

Code:
c:
cd linux
pscp this_one_file.mp3 root@linuxbox:/root


Just trying the one file at a time would make sure that it's not having problems with the multiple files.
Back to top
View user's profile Send private message
JukkaR
n00b
n00b


Joined: 02 Aug 2002
Posts: 61
Location: Finland

PostPosted: Thu Aug 29, 2002 3:28 pm    Post subject: Reply with quote

n0n wrote:
You said that you've only got the root user, right? Make sure you're using "root" instead of "xyz" in that case. I'd also recommend is simplifying the command line just a bit. Try something along these lines:

Code:
c:
cd linux
pscp this_one_file.mp3 root@linuxbox:/root


Just trying the one file at a time would make sure that it's not having problems with the multiple files.


Yes, I've tried using root-account, 'xyz' was just an expirenment - I though that when it asks password for user that doesn't even exist, it haven't connected at all.
Back to top
View user's profile Send private message
Zu`
l33t
l33t


Joined: 26 May 2002
Posts: 716
Location: BE

PostPosted: Thu Aug 29, 2002 3:56 pm    Post subject: Reply with quote

rizzo wrote:
Or if don't want to emerge samba you could just scp. Probably download Putty's pscp for windows and then:

pscp -r <mp3 dir> <username>@<linuxboxname>:<destination>

But emerging samba and using it like a writable windows share would be easier.


Not quite.

There is a great GUI frontent to scp for Windows: WinSCP

This way you can drag and drop files from your Windows box to your linux box using nothing but SSH.
I found it to be very useful for people used to using Windows.

Screenshot:
[img:3b262b1270]http://winscp.vse.cz/eng/screenshots/small/commander.gif[/img:3b262b1270]
Back to top
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Thu Aug 29, 2002 3:58 pm    Post subject: Reply with quote

n0n wrote:

Code:
c:
cd linux
pscp this_one_file.mp3 root@linuxbox:/root


pscp this_one_file.mp3 root@linuxbox: will default to the users' home directory, in this case /root. Note that you DO need the colon.
Back to top
View user's profile Send private message
JukkaR
n00b
n00b


Joined: 02 Aug 2002
Posts: 61
Location: Finland

PostPosted: Thu Aug 29, 2002 4:05 pm    Post subject: Reply with quote

Unfortunately, using Winscp, there's the same problem. When I enter the password, it just asks it again. But it doesn't log in.
Back to top
View user's profile Send private message
Zu`
l33t
l33t


Joined: 26 May 2002
Posts: 716
Location: BE

PostPosted: Thu Aug 29, 2002 4:13 pm    Post subject: Reply with quote

JukkaR wrote:
Unfortunately, using Winscp, there's the same problem. When I enter the password, it just asks it again. But it doesn't log in.


So you can't login remotely using SSH?
Even not on the box itself?
Code:

ssh user@127.0.0.1
Back to top
View user's profile Send private message
Zu`
l33t
l33t


Joined: 26 May 2002
Posts: 716
Location: BE

PostPosted: Thu Aug 29, 2002 4:15 pm    Post subject: Reply with quote

JukkaR wrote:
rizzo wrote:
Do you allow remote root logins? Check your /etc/ssh/sshd_config for the line that says "PermitRootLogin". I think it defaults to yes, but that is something to check.


It was yes but it was commented. Ok, I uncommented - didn't work.


It was commented because all the default settings are commented. You only need to uncomment something if you want to change the default values.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum