| >> HOME >> FC5 MENU >> SSH サーバー (OpenSSH) |
 |
|
|
|
|
|
|
|
|
|
|
| |
|
|
| |
|
|
| |
[root@linux ~]# vi /etc/ssh/sshd_config
# $OpenBSD: sshd_config,v 1.69 2004/05/23 23:59:53 dtucker Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
#Port 22
Protocol 2
#ListenAddress 0.0.0.0
#ListenAddress ::
:
:
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
ServerKeyBits 1024
:
:
# Authentication:
#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
:
:
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
PermitEmptyPasswords no
:
:
MaxStartups 2:80:5
|
|
|
| |
|
|
| |
[root@linux ~]# service sshd restart
sshd を停止中: [ OK ]
sshd を起動中: [ OK ]
|
|
|
|
|
|
| |
|
|
| |
|
|
| |
[root@linux ~]# su - fedora
[fedora@linux ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/fedora/.ssh/id_rsa):
Created directory '/home/fedora/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/fedora/.ssh/id_rsa.
Your public key has been saved in /home/fedora/.ssh/id_rsa.pub.
The key fingerprint is:
fs:0l:kd:hf:jr:hr:ni:er:68:32:98:jd:... fedora@linux.mountainbigroad.jp
[fedora@linux ~]$ ls -l .ssh/
合計 16
-rw------- 1 fedora fedora 243 11月 19 16:14 authorized_keys
-rw------- 1 fedora fedora 951 11月 19 16:14 id_rsa
[fedora@linux ~]$ cat .ssh/id_rsa.pub >> .ssh/authorized_keys
[fedora@linux ~]$ rm -f .ssh/id_rsa.pub
[fedora@linux ~]$ chmod 600 .ssh/authorized_keys
[fedora@linux ~]$ exit 
|
|
|
| |
|
|
| |
[root@linux ~]# mount /media/floppy/
[root@linux ~]# cp /home/fedora/.ssh/id_rsa /media/floppy/
[root@linux ~]# rm -f /home/fedora/.ssh/id_rsa
[root@linux ~]# umount /media/floppy/ 
|
|
|
|
|
|
| |
|
|
 |
|
 |
 |