Securing-Optimizing-RH-Linux-1_2_180
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca
© Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ®
180
commands from there. It is a suitable replacement for insecure program like telnet, rlogin, rcp,
rdist, and rsh.
·
To logging to a remote machine, use the command:
[root@deep /]# ssh1 -l <login_name> <hostname>
For example:
[root@deep /]# ssh1 -l admin www.openarch.com
admin@deep.openarch.coms password:
Last login: Tue Oct 19 1999 18:13:00 -0400 from deep.openarch.com
No mail.
[admin@www admin]$
Where <login_name> is the name you use to connect to ssh server and <hostname> is the
remote address of your ssh server.
scp1
The scp1 (Secure Copy) utility copy files from the local system to a remote system or vice versa,
or even between two remote systems using the scp command.
·
To copy files from remote to local system, use the following command:
[root@deep /]# su admin
[admin@deep /]$ scp1 -p <login_name@hostname>:/dir/for/file localdir/to/filelocation
For example:
[admin@deep /]$ scp1 -p admin@mail:/etc/test1 /tmp
Enter passphrase for RSA key 'admin@mail.openarch.com':
test1 | 2 KB | 2.0 kB/s | ETA: 00:00:00 | 100%
·
To copy files from local to remote system, use the following command:
[root@deep /]# su admin
[admin@deep /]$ scp1 -p localdir/to/filelocation <username@hostname>:/dir/for/file
For example:
[admin@deep /]$ scp1 -p /usr/bin/test2 admin@mail:/var/tmp
admin@mail's password:
test2 | 7 KB | 7.9 kB/s | ETA: 00:00:00 | 100%
NOTE: The -p option indicates that the modification and access times as well as modes of the
source file should be preserved on the copy. This is usually desirable.
Some possible uses of SSH software
SSH can be used to:
1.
Replace telnet, rlogin, rsh, rdist, and rcp.
2.
Make secure backup over the network.
3.
Execute remote commands.
Installed files
> /etc/ssh
> /etc/ssh/ssh_host_key
> /etc/ssh/ssh_host_key.pub
> /etc/ssh/ssh_config
> /usr/bin/make-ssh-known-hosts
> /usr/man/man1/scp1.1
> /usr/man/man1/ssh-keygen1.1
> /usr/man/man1/ssh-keygen.1