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连接Mac OS中文乱码的问题
1,ssh工具连接设置里为UTF-8编码
2,在/etc/profile最后加入
   export LANG=zh_CN.UTF-8
3,连接的时候字符编码改成utf-8即可。
修改/etc/profile 提示文件只读。
解决方法:sudo chmod +w /etc/profile 即可
4,执行 source /etc/profile

猜你喜欢

转载自keren.iteye.com/blog/1488042