Mac OS X ssh设置

http://woooh.com/post/2009-03-19/5643360

local:~ yourname$ ssh-keygen -t rsa 

//然后依次回车,输入密码,这个密码和SSH的帐号密码无关。 
//整个界面看上去类似: 
local:~ yourname$ ssh-keygen -t rsa 
Generating public/private rsa key pair. 
Enter file in which to save the key (/u/kim/.ssh/id_rsa):  【回车】 
Enter passphrase (empty for no passphrase): 【直接回车】 
Enter same passphrase again:  【直接回车】 
Your identification has been saved in /u/kim/.ssh/id_rsa. 
Your public key has been saved in /u/kim/.ssh/id_rsa.pub. 

//接下来把密钥文件传到你的SSH帐号下: 
local:~ yourname$  cd ~/.ssh 
local:~ yourname$  cp id_rsa.pub authorized_keys 
local:~ yourname$  scp -p ~/.ssh/authorized_keys vb_macos:.ssh/

解决ssh连接MacOS中文乱码的问题

1,ssh工具连接设置里为UTF-8编码

2,在/etc/profile最后加入

exportLANG=zh_CN.UTF-8

3,连接的时候字符编码改成utf-8即可。

修改/etc/profile提示文件只读。

解决方法:sudochmod+w/etc/profile即可

4,执行source/etc/profile

相关推荐