2009�N02��07��

OpenSSH ����1

��ɂ���āA�ݒ肪�悭�������B
���h�ȓ��{��}�j���A���͂��邪�A�Œ�ǂ��ݒ肵�Ȃ���΂����Ȃ�����������Ȃ��B
���̂ւ��������������Ȃ����ȁB
�e�Ɋp�A�������Ă݂�B

# /usr/sbin/sshd

���܂���sshd �Ƃ������[�U�[�����Ȃ��ƌ����̂ō��

# adduser sshd -h /sshd
password �� �K���ɁB

/sshd �̃f�B���N�g�����A�ꏊ�������������͕s���B�p�[�~�b�V�������d�v�Ƃ̘b�����邪�A�Ƃ肠����755�̂܂�

# /usr/sbin/sshd -dd
could not load host key:/etc/ssh/ssh_host_rsa_key
could not load host key:/etc/ssh/ssh_host_dsa_key

���z�X�g�L�[�����[�h�o���Ȃ������Ƃ����B�m���ɂȂ��B��̃t�@�C��������Ă݂�

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/etc/ssh/ssh_host_rsa_key' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.

�]��ɂ����h���Ōx���̎R�i���̑��ɂ������ς��o���j

�������������2�‚̃t�@�C���̃p�[�~�b�V�����𑼂���ς�Ȃ�����B600

Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.

���b�Z�[�W�͘a�炮���A�܂��܂���͉���

��������dsa_key��"abc"�Arsa_key��"xyz"�Ə����Ă݂�B
���b�Z�[�W�ς�炸�B����Ȃ�œ����킫��Ȃ��B(���b�Z�[�W�̕ω����������������c)


���O�O�邤����ssh-keygen�̑��݂�m��
(http://d.hatena.ne.jp/tixe/20060622/1150961126)
(http://www.atmarkit.co.jp/flinux/rensai/linuxtips/432makesshkey.html)

�Ȃ�قǃW�F�l���[�^���L��񂾂��B
�����ō������_���炵���B
������������t�@�C�����폜

# /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
Generating public/private rsa key pair.
passphrase too short: have 4 bytes, need > 4

�Z�߂̃p�X���[�h���ꂽ�當�������Z�������炵��


bnEnter passphrase (empty for no passphrase):

���I�G���v�e�B�Ȃ�p�X���[�h�͕s�v�H

����蒼��

# /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
The key fingerprint is:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx root@puppypc
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| |
| |
| |
| |
| |
| |
| |
+-----------------+

���Ȃ񂩏o�����悤���Bdsa�����l�ɍ��
# /usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

���Ē���
# /usr/sbin/sshd -D -dd
debug2: load_server_config: filename /etc/ssh/sshd_config
debug2: load_server_config: done config len = 251
debug2: parse_server_config: config /etc/ssh/sshd_config len 251
debug1: sshd version OpenSSH_5.1p1
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-D'
debug1: rexec_argv[2]='-dd'
debug2: fd 3 setting O_NONBLOCK
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
socket: Address family not supported by protocol

���A�Ȃ񂩓��������ۂ�
�R���\�[������

��winXP���TeraTerm�Őڑ��B
�R���\�[������͎R�̂悤�ȃ��|�[�g(-dd�̃I�v�V���������邩�炩)
�܂��͐���

posted by �^�����q at 23:15| Comment(0) | TrackBack(0) | SSH�@TELNET

2009�N02��06��

TELNET �Ⴕ���� SSH

OpenSSH

��2009/02/06���݂̍ŐV��
OpenSSH 5.1/5.1p1 (2008/7/21)

��OpenSSH �{�Ƃ̓��{���y�[�W
http://www.openssh.com/ja/

��OpenSSH ���{��}�j���A��
http://www.unixuser.org/~euske/doc/openssh/jman/

���̐S��PET�p�b�P�[�W����
http://puppylinux.ca/tpp/bugs/openssh-5.1p1.pet
(puppy�{�Ƃ̃o�[�W�����͌Â�)

���Q�l
http://www.murga-linux.com/puppy/viewtopic.php?t=24794&sid=b4783566e37e592d0c21d3993db43363
posted by �^�����q at 17:43| Comment(0) | TrackBack(0) | SSH�@TELNET