old-www/LDP/solrhe/Securing-Optimizing-Linux-R.../chap16sec134.html

329 lines
5.3 KiB
HTML

<HTML
><HEAD
><TITLE
>SSH2 Users Tools</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.60"><LINK
REL="HOME"
TITLE="Securing and Optimizing Linux"
HREF="index.html"><LINK
REL="UP"
TITLE="Software -Securties(commercial)"
HREF="softsec-com.html"><LINK
REL="PREVIOUS"
TITLE="Ssh2 Per-User Configuration"
HREF="chap16sec133.html"><LINK
REL="NEXT"
TITLE="Installed files"
HREF="chap16sec135.html"></HEAD
><BODY
CLASS="section"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Securing and Optimizing Linux: RedHat Edition -A Hands on Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="chap16sec133.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 16. Software -Securties(commercial)</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="chap16sec135.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="AEN9179"
>16.8. SSH2 Users Tools</A
></H1
><P
>&#13; The commands listed below are some that we use often in our regular use, but many more exist, and you should check the man page and documentation for more details.
</P
><DIV
CLASS="formalpara"
><P
><B
>ssh2. </B
>
Ssh2, Secure Shell provides secure encrypted communications between two untrusted hosts over an insecure network. It is a program for logging securely into a remote machine and executing commands from there. It
is a suitable replacement for insecure program like telnet, rlogin, rcp, rdist, and rsh.
To login to a remote machine, use the command:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="screen"
>&#13; [root@deep] /#<B
CLASS="command"
>ssh2</B
> -l &#60;login_name&#62; &#60;hostname&#62;
</PRE
></TD
></TR
></TABLE
>
<DIV
CLASS="example"
><A
NAME="AEN9187"
></A
><P
><B
>Example 16-1. login to a remote using ssh2</B
></P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="screen"
>&#13; [root@deep] /#<B
CLASS="command"
>ssh2</B
> -l admin www.openna.com
</PRE
></TD
></TR
></TABLE
>
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="literallayout"
><TT
CLASS="computeroutput"
>&#13; Passphrase for key "/home/admin/.ssh2/id_dsa_1024_a" with comment "1024-bit dsa, admin@deep.openna.com, Tue Oct 19 1999 14:31:40 -0400":
admin's password:
Last login: Tue Oct 19 1999 18:13:00 -0400 from deep.openna.com
No mail.
</TT
></PRE
></TD
></TR
></TABLE
>
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="screen"
>&#13; [admin@www ]/admin$
</PRE
></TD
></TR
></TABLE
>
</P
></DIV
>
Where &#60;login_name&#62; is the name you use to connect to the ssh2 remote server and &#60;hostname&#62; is the address of your ssh2 remote server.
</P
></DIV
><DIV
CLASS="formalpara"
><P
><B
>sftp2. </B
>
The sftp2, Secure File Transfer utility is an ftp-like client that provides file transfers over the network. You must already be connected with ssh2 before using the sftp2 utility.
To ftp over ssh2, use the following command:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="screen"
>&#13; [admin@deep /]$<B
CLASS="command"
>sftp2</B
> &#60;hostname&#62;
</PRE
></TD
></TR
></TABLE
>
<DIV
CLASS="example"
><A
NAME="AEN9200"
></A
><P
><B
>Example 16-2. sftp2, Secure File Transfer</B
></P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="screen"
>&#13; [admin@deep /]$<B
CLASS="command"
>sftp2</B
> www.openna.com
</PRE
></TD
></TR
></TABLE
>
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="literallayout"
><TT
CLASS="computeroutput"
>&#13; local path : /home/admin
Passphrase for key "/home/admin/.ssh2/id_dsa_1024_a" with comment "1024-bit dsa, admin@deep.openna.com, Tue Oct 19 1999 14:31:40 -0400":
admin's password:
admin's password:
remote path : /home/admin
</TT
></PRE
></TD
></TR
></TABLE
>
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="screen"
>&#13; sftp&#62;
</PRE
></TD
></TR
></TABLE
>
</P
></DIV
>
Where &#60;hostname&#62; is the name of the remote server you want to sftp.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="chap16sec133.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="chap16sec135.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Ssh2 Per-User Configuration</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="softsec-com.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Installed files</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>