Linux (centos) SSH installation and setup - macos remote connection

  
Action environment: SSH access OS: mac os x 10.7.2

Shell: GNU bash, version 3.2.48(1)-release (x86_64-apple -darwin11)

SSH Service Provider: Vmware Fusion Version 3.0.0 (204229)

CentOS release 5.6 (Final)
SSH Service Provider (Linux) Configuration

    < Li>SSH server installation sudo yum install openssh-server openssh-clients
  1. SSH service self-start setting sudo /sbin/chkconfig sshd on
  2. SSH service startup sudo /sbin/service sshd start< Br>
  3. Firewall settings sudo vi /etc/sysconfig/iptables Add the following line -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 22 -j ACCEPT Restart the firewall Sudo /sbin/service iptables stop sudo /sbin/service iptables start
  4. Adjust SSH settings vi /etc/ssh/sshd_config Disable root login via SSH PermitRootLogin no Open SSH AllowUsers nutcracker to the specified user Save, restart sshd.
  5. Setting Command Line Mode Startup (not required) Since this host is mainly logged in remotely via SSH, closing the GUI saves system resources. Sudo vi /etc/inittab Change id:5:initdefault: to id:3:initdefault: and restart.

    SSH client (mac os) configuration
    1. mac os integrates SSH without any configuration. Open the terminal, ssh 192.168.**.** to connect to the host configured above.
    2. (Outside the question) To enable the mac os SSH service, simply check Remote Login in the Sharing settings, similar to starting the Apache service.


Copyright © Windows knowledge All Rights Reserved