�T�[�o�𑀍�(�ݒ蓙)����ɓ������āA�T�[�o���g�̃R���\�[���ŕύX����̂��ǂ��ł����A���������̃T�[�o�Ȃ̂ł�����N���C�A���g(���u����)���瑀��o����悤�ɂ��Ă݂܂��傤�I
��ʓI�ɂ�Telnet�ő��삵�܂����ATelnet�͕���(���������̂܂܌����Ă��܂�)�ŒʐM���s���Ă��܂��B
���u�n(����WAN����̑���)����̃��O�C�����A�p�X���[�h���������Ă��܂��Ă͂����Ȃ��̂ŁA�����ł��ʐM���e���Í������ĒʐM���o����SSH���g�p���܂��B
SSH�̐ڑ������ɂ�SSH1��SSH2������SSH2�̕����ASSH1��苭�łȈÍ����ɂȂ��Ă��܂��B
�܂��A�����ł�SSH2���g�p���������ɂ�郍�O�C���݂̂�ڑ��\�ɂ���ݒ���s���܂��B
���̐ݒ�́A�T�[�o�����J����ɓ�����K���s���Ă����܂��傤�I
�C���X�g�[�����Ƀf�t�H���g�ő��݂��܂����A�폜��̈ӓI�ɃC���X�g�[�����Ȃ������ꍇ�͈ȉ��̎菇�ŃC���X�g�[�����ĉ������B
�܂��Aopenssh-clients�́A���Y�[������ʂ�openssh-server�[���ɐڑ�����ꍇ�Ɏg�p���܂��B�K�v�ɉ����ăC���X�g�[�����ĉ������B
openssh-server�̃C���X�g�[�� # yum -y install openssh-server openssh-clients�̃C���X�g�[�� # yum -y install openssh-clients |
�ݒ�t�@�C���̕ύX # vi /etc/ssh/sshd_config #LoginGraceTime 120 �擪��#���폜���� yes �� no�ɕύX(root(�Ǘ���)�ł̃��O�C�����֎~) #PermitRootLogin yes �� PermitRootLogin no # To disable tunneled clear text passwords, change to no here! �擪��#���폜���� yes �� no�ɕύX(�ʏ�p�X���[�h�̋֎~(�������ɕύX)) #PasswordAuthentication yes �� PasswordAuthentication no �擪��#���폜(��p�X���[�h�̋֎~) #PermitEmptyPasswords no �� PermitEmptyPasswords no |
�ݒ�t�@�C����ύX���āA���̒l��L���ɂ���ɂ͍ċN�����s��Ȃ���Ȃ�܂���B
OpenSSH�̍ċN�� �yFC1 ���� Fedora15 / CentOS4 / CentOS5 / CentOS6 �̏ꍇ�z # /etc/rc.d/init.d/sshd restart �yFedora16�ȍ~ / CentOS7 �̏ꍇ�z # systemctl start sshd.service |
���A�������N�Ȃ̂��\��(����������Ε�����܂����E�E�E) �� [linux@fedora linux]$ whoami linux �� linux ���[�U�[ ----- root(�Ǘ���)�����ʃ��[�U�ɂȂ�菇 ----- 1 root(�Ǘ���)�����ɂ���ʃ��[�U�ւ̕ύX linux ���[�U�[�ɂȂ� [root@fedora root]# su - linux [linux@fedora linux]$ �� linux ���[�U�[�ɂȂ��� 2 ���O�A�E�g�ɂ���ʃ��[�U�[�ւ̕ύX���@ root(�Ǘ���)�̃��O�A�E�g [root@fedora root]# exit logout �� ���O�A�E�g���� [linux@fedora linux]$ �� linux ���[�U�[�ɖ߂��� ----------------------------------------------------- |
���̍쐬 |
�T�[�o�ɂ��錮���쐬����id_rsa���N���C�A���g����ڑ����邻�̃��[�U�̌��ƂȂ�܂��B
���̌���ڑ�����N���C�A���g�փR�s�[��������@���Љ�܂��B
root(�Ǘ���)�����ōs���Ă������� �t���b�s�[���}�E���g # mount /mnt/floppy/ �閧�����t���b�s�[�Ɉړ� # mv /home/linux/.ssh/id_rsa /mnt/floppy/ �t���b�s�[�̃}�E���g������ # umount /mnt/floppy/ |
1. FTP�T�[�r�X���N������
�ꎞ�I��FTP�T�[�o���C���X�g�[������ # yum -y install vsftpd FTP�T�[�o���N�� �yFC1 ���� Fedora15 / CentOS4 / CentOS5 / CentOS6 �̏ꍇ�z # /etc/rc.d/init.d/vsftpd start �yFedora16�ȍ~ / CentOS7 �̏ꍇ�z # systemctl start vsftpd.service |
2. �N���C�A���g�@���ڑ�����(������Windows��DOS�����s���Ă�������)
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. ���[�J���̃J�����g��C:\�ɂ��Ă��� C:\Documents and Settings\client>cd \ C:\> �� ���[�J����C:\�ɂȂ��� FTP�ŃT�[�o�ɐڑ����� C:\>ftp 192.168.1.5 Connected to 192.168.1.5. 220 (vsFTPd 1.2.1) ���[�U������� User (192.168.1.5:(none)): linux 331 Please specify the password. �p�X���[�h����� Password: 230 Login successful. �]�����[�h���o�C�i�����[�h�ɂ��� ftp> bin 200 Switching to Binary mode. �閧�����擾 ftp> get /home/linux/.ssh/id_rsa 200 PORT command successful. Consider using PASV. 150 Opening BINARY mode data connection for /home/linux/.ssh/id_rsa (951 bytes). 226 File send OK. �� �]������������ ftp: 951 bytes received in 0.00Seconds 951000.00Kbytes/sec. �T�[�o�̔閧�����폜 ftp> delete /home/linux/.ssh/id_rsa 250 Delete operation successful. �� �폜���������� FTP�ڑ����I�� ftp> bye 221 Goodbye. C:\> ���[�J���̊m�F C:\>dir �h���C�u C �̃{�����[�� ���x��������܂���B �{�����[�� �V���A���ԍ��� 649A-F32D �ł� C:\ �̃f�B���N�g�� 2004/09/02 14:34 0 AUTOEXEC.BAT 2004/09/02 14:34 0 CONFIG.SYS 2004/09/02 14:48 <DIR> Documents and Settings 2004/09/23 10:16 951 id_rsa �� �R�s�[����Ă��� 2004/09/22 10:02 <DIR> Program Files 2004/09/06 11:58 <DIR> WINDOWS 3 �̃t�@�C�� 951 �o�C�g 3 �̃f�B���N�g�� 5,651,943,424 �o�C�g�̋̈� DOS���I�� C:\>exit |
3. FTP�T�[�o�̏I��
FTP�T�[�o�̏I�� �yFC1 ���� Fedora15 / CentOS4 / CentOS5 / CentOS6 �̏ꍇ�z # /etc/rc.d/init.d/vsftpd stop �yFedora16�ȍ~ / CentOS7 �̏ꍇ�z # systemctl stop vsftpd.service |
4. FTP�T�[�o�̃A���C���X�g�[��
FTP�T�[�o�̃A���C���X�g�[�� # yum -y remove vsftpd ���l)�A���C���X�g�[�����Ȃ��Ă��T�[�r�X���~�߂邾���ł��\��Ȃ��B �yFC1 ���� Fedora15 / CentOS4 / CentOS5 / CentOS6 �̏ꍇ�z FTP�T�[�r�X�̎����N����~ # chkconfig vsftpd off FTP�T�[�r�X�̎����N���m�F # chkconfig --list vsftpd vsftpd 0:�I�t 1:�I�t 2:�I�t 3:�I�t 4:�I�t 5:�I�t 6:�I�t �yFedora16�ȍ~ / CentOS7 �̏ꍇ�z FTP�T�[�r�X�̎����N����~ # systemctl disable vsftpd.service FTP�T�[�r�X�̎����N���m�F # systemctl status vsftpd.service vsftpd.service - Vsftpd ftp daemon Loaded: loaded (/lib/systemd/system/vsftpd.service; disabled) Active: inactive (dead) CGroup: name=systemd:/system/vsftpd.service |