SecureCRT 连接本地linux虚拟机
2015-07-24 10:19
507 查看
SecureCRT 连接本地linux虚拟机
通过ssh连接到虚拟机,首先需要在虚拟机中安装openssh-client,如未安装通过命令
检查sshserver是否启动:
如果只有ssh-agent说明ssh-server还没启动,需要到/etc/init.d/ssh 执行start,如果看到sshd说明服务已启动。
ssh-server配置文件位于/etc/ssh/sshd_config,在这可定义SSH服务端口,默认22。可定义其他端口如:220,重启服务
通过secureCRT可远端至服务器了。
检查服务器ip地址。
mhchen@mhchen-VirtualBox:~$ ifconfig
可以看到eth0的IP地址信息。
通过ssh连接到虚拟机,首先需要在虚拟机中安装openssh-client,如未安装通过命令
mhchen@mhchen-VirtualBox:~$ sudo apt-get install openssh-server [sudo] password for mhchen: Reading package lists... Done Building dependency tree Reading state information... Done openssh-server is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 323 not upgraded. mhchen@mhchen-VirtualBox:~$提示已经安装过openssh-client.
检查sshserver是否启动:
mhchen@mhchen-VirtualBox:~$ ps -e |grep ssh 2225 ? 00:00:00 ssh-agent 5580 ? 00:00:00 sshd 5651 ? 00:00:00 sshd 5714 ? 00:00:00 sshd 5846 ? 00:00:00 sshd 5887 ? 00:00:00 sshd mhchen@mhchen-VirtualBox:~$
如果只有ssh-agent说明ssh-server还没启动,需要到/etc/init.d/ssh 执行start,如果看到sshd说明服务已启动。
ssh-server配置文件位于/etc/ssh/sshd_config,在这可定义SSH服务端口,默认22。可定义其他端口如:220,重启服务
mhchen@mhchen-VirtualBox:~$ sudo /etc/init.d/ssh restart ssh stop/waiting ssh start/running, process 5990 mhchen@mhchen-VirtualBox:~$最后确定ssh-server已正常工作。
mhchen@mhchen-VirtualBox:~$ netstat -tpl (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 mhchen-VirtualBo:domain *:* LISTEN - tcp 0 0 *:ssh *:* LISTEN - tcp 0 0 localhost:ipp *:* LISTEN - tcp6 0 0 [::]:ssh [::]:* LISTEN - tcp6 0 0 ip6-localhost:ipp [::]:* LISTEN - mhchen@mhchen-VirtualBox:~$看到ssh的tcp信息就说明ssh-server已经正常运行。
通过secureCRT可远端至服务器了。
检查服务器ip地址。
mhchen@mhchen-VirtualBox:~$ ifconfig
可以看到eth0的IP地址信息。
相关文章推荐
- Linux socket 初步
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- Ubuntu Linux使用体验
- c语言实现hashmap(转载)
- Linux 信号signal处理机制
- linux下mysql添加用户
- Scientific Linux 5.5 图形安装教程
- 基于 Linux 集群环境上 GPFS 的问题诊断
- 谁是桌面王者?Win PK Linux三大镇山之宝
- vivi下重新调整分区
- Linux VS Unix:Linux欲一统天下 Unix不死
- linux下设定环境变量
- Linux下修改MySQL编码的方法