Created
February 24, 2011 16:22
-
-
Save riywo/842372 to your computer and use it in GitHub Desktop.
sshの設定をする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ec2-user@domU-11-11-11-11-11-11 ~]$ sudo su - | |
[root@domU-11-11-11-11-11-11 ~]# vim /etc/ssh/sshd_config | |
Port 2222 | |
PermitRootLogin no | |
[root@domU-11-11-11-11-11-11 ~]# service sshd restart | |
[root@domU-11-11-11-11-11-11 ~]# netstat -taopn | |
Active Internet connections (servers and established) | |
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name Timer | |
tcp 0 0 0.0.0.0:2222 0.0.0.0:* LISTEN 1076/sshd off (0.00/0/0) | |
[root@domU-11-11-11-11-11-11 ~]# vim /etc/sysconfig/network | |
HOSTNAME=test-cf | |
[root@domU-11-11-11-11-11-11 ~]# cp /dev/null /etc/motd | |
cp: overwrite `/etc/motd'? y | |
[root@domU-11-11-11-11-11-11 ~]# reboot | |
############################################################################################ | |
[~]$ vim ~/.ssh/config | |
Host test-cf | |
Port 2222 | |
[~]$ ssh test-cf | |
Last login: Thu Feb 24 16:34:20 2011 from ----------------------- | |
[ec2-user@test-cf ~]$ | |
:-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment