LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Transferring file problem (https://www.linuxquestions.org/questions/linux-networking-3/transferring-file-problem-583901/)

satimis 09-11-2007 11:09 AM

Transferring file problem
 
Hi folks,

Server - Ubuntu 7.04 server amd64
rox - File Manager
IP - 192.168.0.10

Workstation - Ubuntu 7.04 desktop
nautilus - File Manager
IP -192.168.0.11

openssh-server and openssh-client installed on both PCs
ssh not yet installed.


On server
$ ssh -Y satimis@192.168.0.11 nautilus

started nautilus locally. But I can't copy file from nautilus on rox, always indicating error


On worstation
$ ssh -Y satimis@192.10.11 rox
satimis@192.168.0.10's password:
Code:

/usr/bin/X11/xauth:  error in locking authority file /home/satimis/.Xauthority

(process:5189): Gdk-WARNING **: locale not supported by C library

(rox:5189): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.
X11 connection rejected because of wrong authentication.
The application 'rox' lost its connection to the display localhost:10.0;
most likely the X server was shut down or you killed/destroyed
the application.

Where shall I check? Do I need install ssh on both PCs?

TIA


B.R.
satimis

satimis 09-11-2007 12:05 PM

problem partially solved
 
Hi folks,


Problem partially solved as follow;

On Sever

$ ls -l /home/satimis/.Xauthority
Code:

--rw------ 1 root root ....... /home/satimis/.Xauthority
$ sudo chown satimis:satimis /home/satimis/.Xauthority
$ ls -l /home/satimis/.Xauthority
Code:

--rw------ 1 satimis satimis ........ /home/satimis/.Xauthority
On workstation
$ ssh -Y satimis@192.168.0.10 rox

started rox file manager.

But still can't transfer file with drag-n-drop

warning;
Code:

ERROR: No such file or directory

Done
There was one error.


satimis

jiml8 09-11-2007 12:06 PM

If I understood you correctly - and I am not sure I did - you entered your ssh command on 192.168.0.10 to open a session on 192.168.0.11 using Nautilus. You then state that it opened Nautilus "locally".

This, of course, is incorrect; you opened a Nautilus session on 192.168.0.11 and via X-forwarding (the -Y option) you got a display on 192.168.0.10. However, this is not local; you are working on 192.168.0.11 so any file you attempt to access that is on 192.168.0.10 simply isn't there.

Now, you then said this:


On worstation
$ ssh -Y satimis@192.10.11 rox
satimis@192.168.0.10's password:

which makes no sense at all to me; I presume there are at least two typos in it.

colucix 09-11-2007 01:03 PM

Why not simply use sftp or scp from command line?!? jiml8 is right about local X-session of a remote application: there is no file transfer protocol in action.

satimis 09-11-2007 09:14 PM

Quote:

Originally Posted by jiml8 (Post 2888773)
If I understood you correctly - and I am not sure I did - you entered your ssh command on 192.168.0.10 to open a session on 192.168.0.11 using Nautilus. You then state that it opened Nautilus "locally".

This, of course, is incorrect; you opened a Nautilus session on 192.168.0.11 and via X-forwarding (the -Y option) you got a display on 192.168.0.10. However, this is not local; you are working on 192.168.0.11 so any file you attempt to access that is on 192.168.0.10 simply isn't there.

Performed following test;


satimis@ubuntu704:~$ scp satimis@192.168.0.10:/home/satimis/colocation.txt colocation.txt
satimis@192.168.0.10's password:
Code:

colocation.txt                                                              100%  610    0.6KB/s  00:00
File transferred.


Previously my way worked. I can drag-n-drop files between server and workstation. Because I have no idea where the file which I want to transfer resides on the remote PC. The server crashed late. I reinstall it. It comes to present situation.


A side question: How to erase the picture of the background of the remote PC after exiting ssh. It remains on the local PC. I need to restart X to erase it. TIA



Quote:

Now, you then said this:


On worstation
$ ssh -Y satimis@192.10.11 rox
satimis@192.168.0.10's password:

which makes no sense at all to me; I presume there are at least two typos in it.
Oh sorry, it was my typing mistake. It should be "ssh -Y satimis@192.168.0.10 rox"


satimis

jiml8 09-12-2007 09:07 AM

Quote:

Previously my way worked. I can drag-n-drop files between server and workstation. Because I have no idea where the file which I want to transfer resides on the remote PC. The server crashed late. I reinstall it. It comes to present situation.
Drag and drop between computers would be via samba or nfs. You need to look there.

satimis 09-12-2007 10:40 AM

Quote:

Originally Posted by jiml8 (Post 2889674)
Drag and drop between computers would be via samba or nfs. You need to look there.

Tks for your advice.


On server:-

satimis@ubuntu:~$ apt-cache policy samba
Code:

samba:
  Installed: (none)
  Candidate: 3.0.24-2ubuntu1.2
  Version table:
    3.0.24-2ubuntu1.2 0
        500 http://security.ubuntu.com feisty-security/main Packages
    3.0.24-2ubuntu1 0
        500 http://us.archive.ubuntu.com feisty/main Packages

Samba not yet installed.

satimis@ubuntu:~$ apt-cache policy nfs
Code:

W: Unable to locate package nfs
package NOT found on repo.


On workstation:-

satimis@ubuntu704:~$ apt-cache policy samba
Code:

samba:
  Installed: (none)
  Candidate: 3.0.24-2ubuntu1.2
  Version table:
    3.0.24-2ubuntu1.2 0
        500 http://debian.linux.org.tw feisty-security/main Packages
    3.0.24-2ubuntu1 0
        500 http://debian.linux.org.tw feisty/main Packages

Samba also not installed. But I haven't touched this workstation. It is/was working w/o problem before and after the server crashed.

satimis@ubuntu:~$ apt-cache policy nfs
Code:

W: Unable to locate package nfs
package NOT found on repo


I suspect whether it is caused by w/o installing samba.


B.R.
satimis

satimis 09-13-2007 08:53 AM

I found the trick
 
Hi folks,


I found out the trick to copy file with drag-n-drog from workstation to server, but only one way. It must be on same file manager.


Steps as follow;

On server:-

$ ssh -Y satimis@192.168.0.11 rox

remote rox-filer displayed on the server. Start rox-filer on server. Drag-n-drop a file from workstation rox-filer onto server rox-filer. While holding down the [Ctrl] key release the mouse key. The file is copied onto the server. It can be edited and re-saved.

But it doesn't work the other way round. File can't be copied from server to workstation. I don't know the reason. Any help? TIA


The above steps doesn't work on workstation.


IIRC previously I can do it both way. File can be copied from server to workstation as well.


B.R.
satimis

colucix 09-13-2007 10:05 AM

I cannot answer to your question, but I have just found another way using nautilus. In the file menu I have "Connect to Server...". It asks me details about protocol, address, port, username and folder location, then I am able to transfer file in both directions. I have Nautilus 2.14.3 on two Fedora Core 5. The infinite ways of Linux...! :)

satimis 09-13-2007 10:20 AM

Hi colucix,


I don't have nautilus on Ubuntu server. But I'll try your version on 2 workstations, both having nautilus running.

Quote:

I cannot answer to your question, but I have just found another way using nautilus. In the file menu I have "Connect to Server...". It asks me details about protocol, address, port, username and folder location, then I am able to transfer file in both directions. I have Nautilus 2.14.3 on two Fedora Core 5. The infinite ways of Linux...! :)
Pls provide in more detail about your steps. Which file menu has "Connect to Server"? TIA


B.R.
satimis

colucix 09-13-2007 10:54 AM

Quote:

Originally Posted by satimis (Post 2890737)
Pls provide in more detail about your steps. Which file menu has "Connect to Server"? TIA

It is in any window of the Nautilus file browser. When you click "Connect to server" it pops up a form to fill with details about connection, launch it and an icon appears on desktop. Click on the icon: it prompts for the password of the user on the remote machine, then a file browser appears. Here you can navigate directories on the remote machine and simply drag 'n drop to a file browser of the local machine. I think it copies files through scp. Cheers!

satimis 09-14-2007 03:56 AM

Quote:

Originally Posted by colucix (Post 2890765)
It is in any window of the Nautilus file browser. When you click "Connect to server" it pops up a form to fill with details about connection, launch it and an icon appears on desktop. Click on the icon: it prompts for the password of the user on the remote machine, then a file browser appears. Here you can navigate directories on the remote machine and simply drag 'n drop to a file browser of the local machine. I think it copies files through scp. Cheers!

Hi colucix,


I tried your advice but NOT very successful.

On the "Connect to Server" window
Service type : SSH
Server : satimis@192.168.0.11
leaving other optional items blank. I have no idea of port.

--> Connect

An icon popup on the desktop. Clicking the icon starts connecting but hanging there for prolonged time. In one occasion it popup for password then starting remote nautilus locally. I can copy files with drag-n-drop, 2 ways.


I also tried "192.168.0.11". An empty "nautilus" window popup with an icon displayed on desktop.


Any advice? TIA


B.R.
satimis

colucix 09-14-2007 11:29 AM

Quote:

Originally Posted by satimis (Post 2891544)
An icon popup on the desktop. Clicking the icon starts connecting but hanging there for prolonged time. In one occasion it popup for password then starting remote nautilus locally. I can copy files with drag-n-drop, 2 ways.

Hi satimis, this seems a connection problem. Anyway, I filled the fields like the following:
Code:

Service type: SSH
Server: 192.168.0.8
Port: 22
Folder: /home/colucix
User Name: colucix
Name to use for connection: colucix

Port 22 is the default for ssh protocol. By the way I also tried as you describe (without specifying optional parameters) and it works like a charm. Therefore I can only think to slow connection...
bye


All times are GMT -5. The time now is 12:22 AM.