使用secureCRT登录mac本地终端

转自: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.plist
2.查看是否启动:

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
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值