环境: VMwork - RHEL 5.4
启动SecureCRT, 文件 -> 快速连接, 协议选择SSH2, 主机名填写Linux主机的IP. 其他默认, 连接.
然后会出现一个密码框, 要求你输入账户和密码.
如果没有出现密码框, 可以看下Linux的防火墙设置, 在信任的服务里面勾选上SSH.
如果输入账户密码后, 被告知错误而无法连接, 则可能有以下两种情况:
1. root账户
2. 使用的账户密码为空对此两种情况, 可以打开/etc/ssh/sshd_config文件, 发现有如下被注释的两行配置:
#PermitRootLogin yes
#PermiEmptyPasswords no
将这两行改为:
PermitRootLogin yes
PermiEmptyPasswords yes
最后/etc/init.d/ssdh restart即可. 连接后你会发现终端里的问题都是单色, 在SecureCRT中, 选择会话选项 -> 仿真, 选择Linux, 并勾选ANSI颜色.
vim也是可以上色的, 编辑/etc/vimrc, 用以下代码覆盖原有内容:
" ==============================================
" General settings
" ==============================================
set nocp
set ru
set nu
"set cin
"set cino = :0g0t0(sus
set sm
set ai
set sw=4
set ts=4
set noet
set lbr
set hls
"set backspace = indent , eol , start
"set whichwrap = b , s , < , > , [ , ]
"set fo+ = mB
set selectmode =
"set mousemodel = popup
set keymodel =
"set selection = inclusive
"set matchpairs+ =
" ==============================================
" Cursor movement
" ==============================================
"nnoremap gj
"nnoremap gk
"vnoremap gj
"vnoremap gk
"inoremap gj
"inoremap gk
"nnoremap g$
"nnoremap g0
"vnoremap g$
"vnoremap g0
"inoremap g$
"inoremap g0
"nmap :confirm bd
"vmap :confirm bd
"omap :confirm bd
"map! :confirm bd
syntax on
set foldmethod=syntax
if (has( " gui_running " ))
set nowrap
set guioptions+=b
colo inkpot
else
set wrap
colo ron
endif
"let mapleader = " , "
if !has("gui_running")
set t_Co=8
set t_Sf=^[[3%p1%dm
set t_Sb=^[[4%p1%dm
endif