Previous |
Home | Next |
Version: | - openssh 4.3p2 |
[bash]# cp
/etc/ssh/sshd_config /etc/ssh/sshd_config.original [bash]# vi /etc/ssh/sshd_config |
Port 22 Protocol 2 #AddressFamily any AddressFamily inet #ListenAddress 0.0.0.0 #ListenAddress :: |
# HostKey for protocol version 1 #HostKey /etc/ssh/ssh_host_key # HostKeys for protocol version 2 #HostKey /etc/ssh/ssh_host_rsa_key #HostKey /etc/ssh/ssh_host_dsa_key |
KeyRegenerationInterval 1h ServerKeyBits 1024 |
SyslogFacility AUTHPRIV LogLevel INFO |
PermitRootLogin no LoginGraceTime 30s MaxAuthTries 4 |
AllowUsers sshconnect AllowGroups sshusers |
DenyUsers alice bob DenyGroups sshdeny |
PasswordAuthentication
yes PermitEmptyPasswords no |
AuthorizedKeysFile .ssh/authorized_keys |
Banner /etc/ssh/banner PrintMotd yes |
Subsystem sftp /usr/libexec/openssh/sftp-server |
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT AcceptEnv LC_IDENTIFICATION LC_ALL |
[bash]# chkconfig --level 2345 sshd on [bash]# chkconfig --list sshd |
[bash]# /etc/init.d/sshd restart [bash]# grep sshd /var/log/messages |
[bash]# ssh [email protected] |
The authenticity of host 'galaxy.example.com (192.168.1.1)'
can't be established. RSA key fingerprint is cd:3e:99:ef:5a:e6:6e:40:a4:25:79:a1:50:31:4b:7a. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'galaxy.example.com' (RSA) to the list of known hosts. [email protected]'s password: |
[bash]# ssh [email protected] |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. The fingerprint for the RSA key sent by the remote host is 8e:ed:e3:45:50:5e:13:33:58:0e:d5:eb:e6:fc:ef:43. Please contact your system administrator. Add correct host key in /home/alice/.ssh/known_hosts to get rid of this message. Offending key in /home/alice/.ssh/known_hosts:14 RSA host key for galaxy.example.com has changed and you have requested strict checking. Host key verification failed. |
[bash]# uname -n |
galaxy.example.com |
[bash]# sftp [email protected] |
[bash]# scp filename [email protected]:/home/alice |
[bash]# scp [email protected]:/home/bob/*
/officeusers/bob |
[bash]# scp -r /home/alice/public_html/*
[email protected]:~/public_html |
[bash]# scp -r -P 1234 [email protected]:~/* /home/bob |
[bash]# scp -r [email protected]:/etc/* [email protected]:/etc/ |
Previous |
Home | Next |