summaryrefslogtreecommitdiffstats
path: root/doc/en/remote-connections.docbook
blob: 5feb16866c56217b19392d95172251f0f3c3b3f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<sect1 id="remote-connections">
  <title>Remote Connections</title>
  <indexterm>
    <primary>Remote Connections</primary>
  </indexterm>
  <para>Remote connections are easily made by typing the
  &URL; in the 
  <link linkend="list_panel">Location Toolbar</link>; these are
  actually &kioslaves1-url;. Please note that the
  &krusader; panel does not support all
  &kioslaves2-url; &eg; 
  <command>http://</command> will not work in the panel, but will
  work in the 
  <link linkend="krviewer">viewer</link>. Some examples:</para>
  <itemizedlist>
    <listitem>
      <para>
        <userinput>
          <command>ftp://</command><replaceable>public.ftpserver.org/directory/</replaceable>
        </userinput>
      </para>
    </listitem>
    <listitem>
      <para>
        <userinput>
          <command>fish://</command><replaceable>username@hostname/</replaceable>
        </userinput>
      </para>
    </listitem>
    <listitem>
      <para>
        <userinput>
          <command>sftp://</command><replaceable>username:password@sftp.foo.org/</replaceable>
        </userinput>
      </para>
    </listitem>
    <listitem>
      <para>
        <userinput>
          <command>ftp://</command><replaceable>username@my.server.org:21/directory/</replaceable>
        </userinput>
      </para>
    </listitem>
    <listitem>
      <para>
        <userinput>
          <command>smb://</command><replaceable>username:password@server/share</replaceable>
        </userinput>
      </para>
    </listitem>
    <listitem>
      <para>
        <userinput>
          <command>ftp://</command><replaceable>username@proxyusername:password@proxipassword@hostname/directory</replaceable>
        </userinput>
      </para>
    </listitem>
    <listitem>
      <para>
        <userinput>
          <command>nfs://</command><replaceable>&lt;host&gt;:&lt;port&gt;&lt;url-path&gt;</replaceable>
        </userinput>
      </para>
    </listitem>
    <listitem>
      <para>
        <userinput>
          <command>webdav://</command><replaceable>www.server.com/path/</replaceable>
        </userinput>
      </para>
    </listitem>
  </itemizedlist>
  <para>You can bookmark these &URL;'s, however, please
  read the 
  <link linkend="bookman">Bookman</link> section regarding 
  <emphasis>securely save passwords</emphasis>. For connecting to
  multiple locations, bookmark these &URL;'s and open
  them one by one, or open them all together by using
  &panel-profiles-lnk;. To switch from one to another
  location, just open a &foldertabs-lnk; for
  each.</para>
  <para>There are three ways to start a remote connection: 
  <itemizedlist>
    <listitem>
      <para>Type the &URL; in the 
      <link linkend="list_panel">Location Toolbar</link></para>
    </listitem>
    <listitem>
      <para>Select 
      <emphasis role="bold">
        <menuchoice>
          <guimenu>Commands</guimenu>
          <guimenuitem>New Net Connection</guimenuitem>
        </menuchoice>
      </emphasis>which will pop-up a dialog that will ask for the
      remote site details. This dialog is handy if you are not used
      to type remote &URL;'s in the Location Toolbar.
      Leaving the password and user name fields empty will log you
      in as anonymous. NOTE: we are planning to rewrite this dialog
      window.</para>
    </listitem>
    <listitem>
      <para>You can bookmark a directory on a remote host and
      return to this directory from the bookmark button on the top
      corner of your panel just like in a web browser.</para>
    </listitem>
  </itemizedlist></para>
  <para>After you log on to a remote server you can browse it just
  like your local hard drive with the following exceptions: 
  <itemizedlist>
    <listitem>
      <para>You cannot execute files on remote servers.</para>
    </listitem>
    <listitem>
      <para>Permissions cannot always be calculated on remote
      servers (depends on server and access method) so you might
      get a "?" on the permissions columns for some files.</para>
    </listitem>
    <listitem>
      <para>Disk usage information is not available for most remote
      filesystems.</para>
    </listitem>
  </itemizedlist></para>
  <para>To change the charset of the remote host use 
  <emphasis role="bold">
    <menuchoice>
      <guimenu>Commands</guimenu>
      <guimenuitem>Select Remote Charset</guimenuitem>
    </menuchoice>
  </emphasis>.</para>
  <para>You can 
  <emphasis role="bold">close the current Active Remote
  Connection</emphasis> by two separate methods: 
  <itemizedlist>
    <!--
        <listitem>
           <para>Manually: <emphasis role="bold"><menuchoice><guimenu>Commands</guimenu>
                 <guimenuitem>Disconnect From Net</guimenuitem></menuchoice></emphasis></para>
        </listitem>
        -->
    <listitem>
      <para>Manually: Add the disconnect button to the
      &main-toolbar-lnk; and click on it.</para>
    </listitem>
    <listitem>
      <para>Automatically: Change the &URL; in the
      &location-toolbar-lnk; .</para>
    </listitem>
  </itemizedlist></para>
  <note>
    <para>&krusader; is a file manager that supports
    remote connections via &kioslaves1-url;, but if you
    are looking for even more advanced remote connections features,
    &eg; an advanced &FTP;-client we
    recommend you to use &eg;
    &kasablanca-url; or
    &kftpgrabber-url;.</para>
  </note>

<sect2 id="remote-connections-lan-fish">
  <title>LAN connections via fish:/ protocol (zeroconf)</title>
  <indexterm>
    <primary>Remote LAN Connections (zeroconf)</primary>
  </indexterm>

<para>This section is contributed by 
      <ulink url="http://krusader.sourceforge.net/phpBB/viewtopic.php?t=1912">Andrew Svet (z-vet)</ulink>,
      feedback about this chapter is appriciated. Thanks!</para>

 <note>
   <para>This works on a &debian; system, so it will work on &debian; and derivatives (&kubuntu; &etc;), though
   it should work on other Linuxes as well. 
   We assume that you have <link linkend="gloss-ssh">SSH</link> installed, configured and working on 
   every machine on LAN you want to connect to/from.
   There are plenty of very good tutorials about <link linkend="gloss-ssh">SSH</link> on the net, &eg;
   at <ulink url="http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch17_:_Secure_Remote_Logins_and_File_Copying">linuxhomenetworking.com</ulink> 
   or just google for it.  We use the default <link linkend="gloss-ssh">SSH</link> port (22) for this chapter.
   Remember to change it if you use different one. All modifications, editing &etc; must be done as root. 
   </para>
 </note>

<para>
Let's start with installing all the packages we need: 
<screen>
<prompt>#</prompt> <userinput><command>apt-get install</command> <option>avahi-daemon libnss-mdns kdnssd</option></userinput>
</screen>

Everything is installed, now let's do some configuration. First, we need our services to be announced on LAN.
That's why we installed avahi-daemon: it represents your machine on local network and allows other applications 
to publish services they provide. Avahi-daemon comes with example <filename>ssh.service</filename> configuration 
file found in <filename>/usr/share/doc/avahi-daemon/examples</filename> . In order to get the service to be 
announced on LAN we need to copy this file to <filename>/etc/avahi/services</filename> directory: 
<screen>
<prompt>#</prompt> <userinput><command>cp</command> <option>/usr/share/doc/avahi-daemon/examples/ssh.service /etc/avahi/services</option></userinput>
</screen>

Now we need fish:/ protocol to be announced too, so we use an ssh.service file as a template for fish.service: 
<screen>
<prompt>#</prompt> <userinput><command>cp</command> <option>/etc/avahi/services/ssh.service /etc/avahi/services/fish.service</option></userinput>
</screen>

This file is just a copy of ssh.service, Edit the <filename>fish.service</filename> file and replace 
"Remote Terminal on %h" with "Fish to %h" and "_ssh._tcp" with "_fish._tcp". 

Here's how it looks after edit: 
<programlisting> 
&lt;?xml version="1.0" standalone='no'?&gt;&lt;!--*-nxml-*--> 
&lt;!DOCTYPE service-group SYSTEM "avahi-service.dtd"&gt;

&lt;!-- $Id: remote-connections.docbook,v 1.6 2007/05/02 18:07:28 codeknight Exp $ --> 

&lt;!-- 
  This file is part of avahi. 
  
  avahi is free software; you can redistribute it and/or modify it 
  under the terms of the GNU Lesser General Public License as 
  published by the Free Software Foundation; either version 2 of the 
  License, or (at your option) any later version. 

  avahi is distributed in the hope that it will be useful, but 
  WITHOUT ANY WARRANTY; without even the implied warranty of 
  MERCHANTABILITY or FITNESS FOR 

&lt;!-- See avahi.service(5) for more information about this configuration file --> 

&lt;service-group> 

  &lt;name replace-wildcards="yes">FISH to %h&lt;/name> 

  &lt;service> 
    &lt;type>_fish._tcp&lt;/type> 
    &lt;port>22&lt;/port> 
  &lt;/service> 

&lt;/service-group>  
</programlisting>
Save the modified file. 

Now we need to create a new file <filename>_fish._tcp</filename>, open a text editor and add the next lines:
<programlisting>
Name=FISH Protocol (ssh) 
Type=_fish._tcp 
UserEntry=u 
PathEntry=path 
PasswordEntry=p
</programlisting> 
And save the file <filename>/usr/share/apps/zeroconf/_fish._tcp</filename>

Do the same on each machine on your LAN, then restart avahi-daemon: 
<screen>
<prompt># /etc/init.d/</prompt> <userinput><command>avahi-daemon</command> <option>restart</option></userinput>
</screen>

Than open &krusader; and type in location-toolbar-lnk: <filename>zeroconf:/</filename> to open the  
<link linkend="gloss-zeroconf">zeroconf</link> connection.
Enter the <guilabel>Fish Protocol</guilabel> directory. Inside you'll find the links to each machine that 
announced <filename>fish:/</filename> on your LAN, the location-toolbar-lnk: will point to 
<filename>zeroconf:/_fish._tcp</filename> Double clicking on any of these machines,
them will bring up the password prompt, asking you for yor ssh key passphrase (if password was set). 
Enter your passphrase. Congratulations: you connected to remote machine using &krusader;!
</para> 

</sect2>

</sect1>