comparison es/collab.tex @ 526:4a1dc5e8e2ff

Started ssh protocol translation
author Igor TAmara <igor@tamarapatino.org>
date Sun, 23 Nov 2008 23:15:17 -0500
parents 7f5d542be96b
children 35370f1551a7
comparison
equal deleted inserted replaced
525:e5739e8d708f 526:4a1dc5e8e2ff
308 Normalmente, cuando se inicia \hgcmd{serve}, no imprime nada, lo cual 308 Normalmente, cuando se inicia \hgcmd{serve}, no imprime nada, lo cual
309 puede ser desconcertante. Si desea confirmar que en efecto está 309 puede ser desconcertante. Si desea confirmar que en efecto está
310 ejecutándose correctamente, y darse cuenta qué URL debería enviar a 310 ejecutándose correctamente, y darse cuenta qué URL debería enviar a
311 sus colaboradores, inícielo con la opción \hggopt{-v}. 311 sus colaboradores, inícielo con la opción \hggopt{-v}.
312 312
313 \section{Using the Secure Shell (ssh) protocol} 313 \section{Uso del protocolo Secure Shell (ssh)}
314 \label{sec:collab:ssh} 314 \label{sec:collab:ssh}
315 315
316 You can pull and push changes securely over a network connection using 316 Usted puede publicar y jalar cambios en la red de forma segura usando
317 the Secure Shell (\texttt{ssh}) protocol. To use this successfully, 317 el protocolo Secure Shell (\texttt{ssh}). Para usarlo satisfactoriamente,
318 you may have to do a little bit of configuration on the client or 318 tendrá que hacer algo de configuración a nivel de cliente o el
319 server sides. 319 servidor.
320 320
321 If you're not familiar with ssh, it's a network protocol that lets you 321 Si no está familizarizado con ssh, es un protocolo de red que le permite
322 securely communicate with another computer. To use it with Mercurial, 322 comunicarse con seguridad con otro computador. Para usarlo con
323 you'll be setting up one or more user accounts on a server so that 323 Mercurial, estará estableciendo una o más cuentas de usuario en un
324 remote users can log in and execute commands. 324 servidor de forma tal que los usuarios remotos puedan entrar y
325 325 ejecutar órdenes.
326 (If you \emph{are} familiar with ssh, you'll probably find some of the 326
327 material that follows to be elementary in nature.) 327 (Si ssh le \emph{es} familiar, encontrará probablemente elemental una
328 328 porción del material a continuación.)
329 \subsection{How to read and write ssh URLs} 329
330 330 \subsection{Cómo leer y escribir URLs de ssh}
331 An ssh URL tends to look like this: 331
332 Los URLs de ssh tienden a lucir de la siguiente forma:
332 \begin{codesample2} 333 \begin{codesample2}
333 ssh://bos@hg.serpentine.com:22/hg/hgbook 334 ssh://bos@hg.serpentine.com:22/hg/hgbook
334 \end{codesample2} 335 \end{codesample2}
335 \begin{enumerate} 336 \begin{enumerate}
336 \item The ``\texttt{ssh://}'' part tells Mercurial to use the ssh 337 \item La parte ``\texttt{ssh://}'' indica a Mercurial que use el
337 protocol. 338 protocolo ssh.
338 \item The ``\texttt{bos@}'' component indicates what username to log 339 \item El componente ``\texttt{bos@}'' indica el nombre del usuario que
339 into the server as. You can leave this out if the remote username 340 está entrando al servidor. Puede omitirl si el usuario remoto
340 is the same as your local username. 341 coincide con el usuario local.
341 \item The ``\texttt{hg.serpentine.com}'' gives the hostname of the 342 \item ``\texttt{hg.serpentine.com}'' es el nombre del servidor al cual
342 server to log into. 343 se desea entrar.
343 \item The ``:22'' identifies the port number to connect to the server 344 \item El ``:22'' identifica el número del puerto en el servidor al cual
344 on. The default port is~22, so you only need to specify this part 345 se conectará. El predeterminado es el~22, así que solamente
345 if you're \emph{not} using port~22. 346 necesitará especificar esa porción si \emph{no} está usando el
346 \item The remainder of the URL is the local path to the repository on 347 puerto~22.
347 the server. 348 \item La última porción del URL es la ruta local al repositorio en el
349 servidor.
348 \end{enumerate} 350 \end{enumerate}
349 351
350 There's plenty of scope for confusion with the path component of ssh 352 El componente de la ruta del URL para ssh es una fuente de confusión,
351 URLs, as there is no standard way for tools to interpret it. Some 353 puesto que no hay una forma estándar para que las herramientas puedan
352 programs behave differently than others when dealing with these paths. 354 interpretarlo. Algunos programas se comportan de manera distinta a
353 This isn't an ideal situation, but it's unlikely to change. Please 355 otros cuando manipulan estas rutas. No es la situación ideal, pero
354 read the following paragraphs carefully. 356 es muy poco probable que vaya a cambiar. Por favor lea los párrafos
355 357 siguientes cuidadosamente.
356 Mercurial treats the path to a repository on the server as relative to 358
357 the remote user's home directory. For example, if user \texttt{foo} 359 Mercurial trata la ruta al repositorio en el servidor como relativo al
358 on the server has a home directory of \dirname{/home/foo}, then an ssh 360 directorio chasa del usuario remoto. Por ejemplo, si el usuario
359 URL that contains a path component of \dirname{bar} 361 \texttt{foo} en el servidor tiene el directorio casa
360 \emph{really} refers to the directory \dirname{/home/foo/bar}. 362 \dirname{/home/foo},
361 363 entonces un URL ssh que contenga en su ruta a \dirname{bar}
362 If you want to specify a path relative to another user's home 364 \emph{realmente} se refiere al directorio \dirname{/home/foo/bar}.
363 directory, you can use a path that starts with a tilde character 365
364 followed by the user's name (let's call them \texttt{otheruser}), like 366 Si desea especificar una ruta relativa a otro directorio de usuario,
365 this. 367 puede usar una ruta que comience con un caracter tildado, seguido del
366 \begin{codesample2} 368 nombre del usuario(llamémosle \texttt{otrousuario}, así
367 ssh://server/~otheruser/hg/repo 369 \begin{codesample2}
368 \end{codesample2} 370 ssh://server/~otrousuario/hg/repo
369 371 \end{codesample2}
370 And if you really want to specify an \emph{absolute} path on the 372
371 server, begin the path component with two slashes, as in this example. 373 Y si realmente desea especifica una ruta \emph{absoluta} en el
374 servidor, comience con el componente de la ruta con dos barras como
375 en el siguiente ejemplo:
372 \begin{codesample2} 376 \begin{codesample2}
373 ssh://server//absolute/path 377 ssh://server//absolute/path
374 \end{codesample2} 378 \end{codesample2}
375 379
376 \subsection{Finding an ssh client for your system} 380 \subsection{Encontrar un cliente ssh para su sistema}
377 381
378 Almost every Unix-like system comes with OpenSSH preinstalled. If 382 Casi todos los sistemas tipo Unix vienen con OpenSSH preinstalado. Si
379 you're using such a system, run \Verb|which ssh| to find out if 383 usted está usando un sistema de estos, ejecute \Verb|which ssh| para
380 the \command{ssh} command is installed (it's usually in 384 identificar dónde está instalada la orden \command{ssh} (usualmente
381 \dirname{/usr/bin}). In the unlikely event that it isn't present, 385 estará en \dirname{/usr/bin}). Si por casualidad no está presente,
382 take a look at your system documentation to figure out how to install 386 vea la documentación de sus sistema para lograr instalarlo.
383 it. 387
384 388 En Windows, tendrá que escoger primero un cliente adecuado para
385 On Windows, you'll first need to choose download a suitable ssh 389 descargarlo. Hay dos alternativas:
386 client. There are two alternatives.
387 \begin{itemize} 390 \begin{itemize}
388 \item Simon Tatham's excellent PuTTY package~\cite{web:putty} provides 391 \item El excelente paquete PuTTY~\cite{web:putty} de Simon Tatham, que
389 a complete suite of ssh client commands. 392 ofrece un suite completo de órdenes de cliente ssh.
390 \item If you have a high tolerance for pain, you can use the Cygwin 393 \item Si tiene alta tolerancia al dolor, puede usar el porte de Cygwin
391 port of OpenSSH. 394 para OpenSSH.
392 \end{itemize} 395 \end{itemize}
393 In either case, you'll need to edit your \hgini\ file to tell 396 En cualquier caso, tendrá que editar su fichero \hgini\ para indicarle
394 Mercurial where to find the actual client command. For example, if 397 a Mercurial dónde encontrar la orden real del cliente. Por ejemplo, si
395 you're using PuTTY, you'll need to use the \command{plink} command as 398 está usando PuTTY, tendrá que usar la orden \command{plink} como un
396 a command-line ssh client. 399 cliente de línea de órdenes.
397 \begin{codesample2} 400 \begin{codesample2}
398 [ui] 401 [ui]
399 ssh = C:/path/to/plink.exe -ssh -i "C:/path/to/my/private/key" 402 ssh = C:/ruta/a/plink.exe -ssh -i "C:/ruta/a/mi/llave/privada"
400 \end{codesample2} 403 \end{codesample2}
401 404
402 \begin{note} 405 \begin{note}
403 The path to \command{plink} shouldn't contain any whitespace 406 La ruta a \command{plink} no debería contener espacios o caracteres
404 characters, or Mercurial may not be able to run it correctly (so 407 en blanco, o Mercurial no podrá encontrarlo correctamente (por lo
405 putting it in \dirname{C:\\Program Files} is probably not a good 408 tanto, probablemente no sería buena idea colocarlo en
406 idea). 409 \dirname{C:\\Program Files}
407 \end{note} 410 \end{note}
408 411
409 \subsection{Generating a key pair} 412 \subsection{Generar un par de llaves}
410 413
411 To avoid the need to repetitively type a password every time you need 414 Para evitar la necesidad de teclera una clave de forma repetitiva cada
412 to use your ssh client, I recommend generating a key pair. On a 415 vez que necesita usar el cliente, recomiendo generar un par de llaves.
413 Unix-like system, the \command{ssh-keygen} command will do the trick. 416 En un sistema tipo Unix, la orden \command{ssh-keygen} también se
414 On Windows, if you're using PuTTY, the \command{puttygen} command is 417 comportará bien. En Windows, si está usando PuTTY, la orden
415 what you'll need. 418 \command{puttygen} es la que necesitará.
416 419
417 When you generate a key pair, it's usually \emph{highly} advisable to 420 Cuando genera un par de llaves, se aconseja \emph{comedidamente}
418 protect it with a passphrase. (The only time that you might not want 421 protegerlas con una frase de clave. (La única oportunidad en la cual
419 to do this id when you're using the ssh protocol for automated tasks 422 usted querría identificarse una única vez, es cuando está usando
420 on a secure network.) 423 el protocolo ssh para tareas automatizadas en una red segura.)
421 424
422 Simply generating a key pair isn't enough, however. You'll need to 425 No basta con generar un par de llaves. Se requiere adicionar una llave
423 add the public key to the set of authorised keys for whatever user 426 pública al conjunto de llaves autorizadas para todos los usuarios
424 you're logging in remotely as. For servers using OpenSSH (the vast 427 remotos que se vayan a autenticar. Para aquellos servidores que usen
425 majority), this will mean adding the public key to a list in a file 428 OpenSSH(la gran mayoría), significará añadir la llave pública a la
426 called \sfilename{authorized\_keys} in their \sdirname{.ssh} 429 lista en el fichero llamado \sfilename{authorized\_keys} en su
427 directory. 430 directorio \sdirname{.ssh}.
428 431
429 On a Unix-like system, your public key will have a \filename{.pub} 432 En sistemas tipo Unix, su llave pública tendrá la extensión
430 extension. If you're using \command{puttygen} on Windows, you can 433 \filename{.pub}. Si usa \command{puttygen} en Windows, puede
431 save the public key to a file of your choosing, or paste it from the 434 guardar la llave pública en un fichero de su elección, o pegarla desde
432 window it's displayed in straight into the 435 la ventana en la cual se despliega directamente en el fichero
433 \sfilename{authorized\_keys} file. 436 \sfilename{authorized\_keys}.
434 437
435 \subsection{Using an authentication agent} 438 \subsection{Using an authentication agent}
436 439
437 An authentication agent is a daemon that stores passphrases in memory 440 An authentication agent is a daemon that stores passphrases in memory
438 (so it will forget passphrases if you log out and log back in again). 441 (so it will forget passphrases if you log out and log back in again).