转自:http://www.php230.com/use-securecrt-login-mac-computer-location.html
这2天在配置MAC的环境,总觉的MAC自带的终端不好用,以前在linux下习惯使用secureCRT了,所以想在MAC下也使用secureCRT来连接MAC。
下面介绍一下方法:
1.启动sshd服务:
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist停止sshd服务的方法:
sudo launchctl unload -w /System/Library/LaunchDaemons/ssh.plist2.查看是否启动:
sudo launchctl list | grep ssh下面的输出表示成功启动了:
--------------
- 0 com.openssh.sshd
3. 连接mac电脑
ssh localhost
或者
ssh name@127.0.0.1 -p22 (22是ssh的默认端口)
4.登录后中文乱码的解决方法:(4.1),secureCRT连接设置编码为UTF-8编码
(4.2),在/etc/profile最后加入 export LANG=zh_CN.UTF-8
(4.3),修改/etc/profile 提示文件只读。 sudo chmod +w /etc/profile
(4.4),执行 source /etc/profile