Cyberduck Mountain Duck CLI

Changes between Version 1 and Version 2 of help/sk/howto/sftp


Ignore:
Timestamp:
Nov 17, 2010 5:39:45 PM (9 years ago)
Author:
rudo.ba
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • help/sk/howto/sftp

    v1 v2  
    1 '''Contributions to this help are welcome! This is a Wiki, you can edit the pages. Below is the content displayed from the [wiki:help/en/howto/sftp English] page.'''
     1[[TOC()]]
    22
    3 [[Include(wiki:help/en/howto/sftp)]]
     3= [wiki:help/sk Pomocník pre Cyberduc] / [wiki:help/sk/howto Ako na to] / SFTP =
     4
     5== Pripojenia SFTP ==
     6
     7Ak máte prístup k serveru pomocou secure shell ([http://en.wikipedia.org/wiki/Secure_Shell SSH2]), s najväčšou pravdepodobnosťou je tiež nainštalovaný a skonfigurovaný `sftp-server`, môžete sa pripojiť využitím [http://en.wikipedia.org/wiki/SSH_file_transfer_protocol SFTP].
     8
     9== Konfigurácia interoperability OpenSSH ==
     10
     11The following configuration options from `~/.ssh/config` are supported for SFTP connections:
     12 * ''IdentityFile'' for public key authentication.
     13 * ''HostName'' aliases.
     14 * ''User'' preference for login credentials.
     15
     16Host keys are checked against and written to `~/ssh/known_hosts` when accepted.
     17
     18A [wiki:help/sk/howto/bookmarks bookmark] will update its public key authentication setting from the ''IdentityFile'' configuration in `~/.ssh/config`. Also when opening a new [wiki:help/sk/howto/connection#Toolbarbutton connection] using ''File → Open Connection…'', ''IdentityFile'' and ''User'' parameters in the OpenSSH user config file are auto completed.
     19
     20Príklad konfigurácie:
     21
     22{{{
     23Host myhostname
     24        User myusername
     25        IdentityFile ~/.ssh/mykey-rsa
     26}}}
     27
     28Contrary to ''OpenSSH'', we do '''not''' use the keys named `~/.ssh/identity`, `~/.ssh/id_rsa` or `~/.ssh/id_dsa` by default.
     29
     30== Autentifikácia verejným kľúčom ==
     31
     32Public-key authentication allows you to connect to a remote server without sending your password over the Internet. Public-key authentication uses two keys, a private key that only you have--it should be kept in a secure place and protected with a password. And the public key, which is placed on the server you wish to gain access to, usually by the system administrator when your account is set up. Private keys containing a `DSA` or `RSA` private key in ''PEM'' format are supported (look for `-----BEGIN DSA PRIVATE KEY-----` or `-----BEGIN RSA PRIVATE KEY-----` in the file) and can be configured in the [wiki:help/sk/howto/bookmarks Bookmark] or [wiki:help/sk/howto/connection Connection] panel.
     33
     34=== Ako nakonfigurovať autentifikáciu verejným kľúčom? ===
     35
     36 1. Run the command {{{ssh-keygen}}} from the Terminal.app to generate a public/private pair of keys. They will be put in your directory {{{~/.ssh}}}, though you will probably be asked to approve or change this location. When you generate the keys you will be asked for a 'passphrase'. If you use a passphrase then you will have to enter it each time you use the keys for authentication. That is, you will have to type in the pass phrase everytime you log in, just as you would with a password. If you don't enter a passphrase (just press the return key) then you will be allowed to log-in without having to enter a passphrase. This can be more convenient, but it is less secure.
     37
     38{{{
     39jungle:~/.ssh dkocher$ ssh-keygen -t rsa
     40}}}
     41
     42 2. Copy the public key to the remote host you wish to access and add it to the file {{{authorized_keys}}} in your {{{~/.ssh}}} directory. (If that file does not exist then you should create it.) Anybody listed in the authorized_keys file (via their public key) is allowed to log-in, provided that they can prove that they possess the corresponding private key. Thus if you have the private key in your .ssh directory on your home machine you'll be allowed in.
     43
     44
     45{{{
     46jungle:~/.ssh dkocher$ ssh hostname < id_rsa.pub 'cat >> .ssh/authorized_keys'
     47}}}
     48
     49 3. In the Connection Dialog or the Bookmark editor in Cyberduck select ''Use Public Key Authentication'' and select the private key in your {{{.ssh}}} directory.
     50
     51
     52== Jednorazové heslá ==
     53
     54Je podporované použitie autentifikácie typu výzva-odozva s generátormi jednorazových hesiel ako ''SecurID''. Po prvom prihlasovacom dialógu pre používateľa a heslo sa zobrazí ďalší – pre zadanie jednorazového hesla.
     55
     56== Použitie SCP pre prenos súborov ==
     57
     58Pre vyššiu priepustnosť prenosov súborov možno namiesto SFTP zvoliť použitie SCP. Predvolené nastavenie možno zmeniť v [wiki:help/sk/howto/preferences predvoľbách].
     59
     60== Otvorenie v aplikácii Terminal ==
     61
     62Pomocou ponuky ''Zobrazenie → Upraviť riadok nástrojov…'' možno do prehliadača pridať ikonu ''Terminal.app''. Táto umožňuje jedným kliknutím otvoriť SSH shell pre platný pracovný priečinok.
     63
     64=== Úprava príkazu SSH ===
     65Príkaz SSH možno upraviť pomocou [wiki:help/sk/howto/preferences#Hiddenconfigurationoptions skrytej konfiguračnej voľby]
     66
     67{{{
     68defaults write ch.sudo.cyberduck terminal.command.ssh \"ssh\ -t\ {0}\ {1}@{2}\ -p\ {3}\ \\\"cd\ {4}\ \&\&\ exec\ \\\\\$SHELL\\\"\"
     69}}}
     70
     71where
     72 * {0} is `-i <path to the private key>`
     73 * {1} is the username from the login credentials
     74 * {2} is the hostname
     75 * {3} is the port number of the remote host
     76 * {4} is the current working directory in the browser
     77
     78Because of all the escaping of characters, it might be easier to edit the key using ''Property List Editor'' if you have the developer tools installed. You can then set the string for the key `terminal.command.ssh` to `ssh -t {0} {1}@{2} -p {3} "cd {4} && exec \$SHELL"`. Test the string in ''Terminal.app'' first if it is valid.
     79
     80=== Použitie aplikácie iTerm ===
     81
     82Pomocou [wiki:help/sk/howto/preferences#Hiddenconfigurationoptions skrytej konfiguračnej voľby] možno namiesto ''Terminal.app'' nastaviť použitie terminálovej aplikácie tretej strany.
     83
     84Príklad pre [http://iterm.sourceforge.net/ iTerm]:
     85 
     86{{{
     87defaults write ch.sudo.cyberduck terminal.bundle.identifier net.sourceforge.iTerm
     88defaults write ch.sudo.cyberduck terminal.command \"make\ new\ terminal\\ntell\ the\ first\ terminal\\nlaunch\ session\ \\\"Default\ Session\\\"\\ntell\ the\ last\ session\\nwrite\ text\ \\\"{0}\\\"\\nend\ tell\\nend\ tell\"
     89}}}
     90
     91Ak chcete obnoviť predvolené nastavenia, použite:
     92
     93{{{
     94defaults delete ch.sudo.cyberduck terminal.bundle.identifier
     95defaults delete ch.sudo.cyberduck terminal.command
     96}}}
     97
     98== Vzdialené príkazy ==
     99
     100Pre podrobnosti o možnosti zasielania vlastných príkazov cez SSH viď stránku o [wiki:help/sk/howto/commands#SSHserver vlastných príkazoch] prehliadača.
     101
     102== Problémy ==
     103
     104=== Illegal sftp packet len ===
     105The error message `Illegal sftp packet len` may indicate you have an `echo` statement in your shell init script like ''.bashrc''. Make sure it does not output any text.
swiss made software