Replacing Telnet; OpenSSH, a secure alternative
Ssh also provides you with a secure way to transfer your files over the
Internet. The program to use here is scp (Secure Copy). Scp syntax is also
very basic.
scp user@host:filename user@host:filename
To copy a local file to another host using ssh
scp freeos.gif mayank@foo.com:
This will copy the file freeos.gif in the current directory to user mayank
at host foo.com. The ':' at the end of the destination is required because
otherwise scp will copy the file to one named mayank@foo.com.
To copy from a remote host to your local directory
scp mayank@foo.com:freeos.gif .
This will copy the file freeos.gif from user mayank's home directory at
foo.com to the local directory.
There is also a '-r' option for recursive copying of files across directories.
User configuration
The default OpenSSH configuration will work for everyone. You will find
the system wide configuration files in /etc/ssh or if your left it at the
default, in /usr/local/etc. There will be two configuration files here,
ssh_config and sshd_config. The file ssh_config set's the options for the
ssh client program that you will be using. The second file, sshd_config is
the SSH daemon configuration file.
The configuration file for ssh only set the default options for itself.
When a user runs ssh, it first looks at the command line options,
$HOME/.ssh/config followed by /etc/ssh/ssh_config. This allows a user to
put in his own options.
The format of $HOME/.ssh/ssh_config is quite simple. There are quite a few
options here but not all are required.
A simple host entry would be
host foo
compression yes
DSAAuthentication yes
hostname ssh.foo.com
user foo2
IdentityFile [filename]
Each section in the config file starts with a "host" line. Wildcards (*
and ?) are allowed here. A "Host *" would mean that the configuration
below is to be used for all hosts. "Host *freeos.com" is also a valid
entry.
Compression is a good option to give here. In addition to an encrypted
connection, you can also choose to compress the data. This is great over
slower modem links. An additional parameter that you can give after this
is "CompressionLevel". Possible values for this are 1 thru 9 with 1 being
the least level of compression and 9 being the most compression.
DSAAuthentication specifies that you would like to use the more secure DSA
- « first
- ‹ previous
- of 5
- next ›
- last »