SecureCRTローカルlinux仮想マシンへの接続


SecureCRTローカルlinux仮想マシンへの接続
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が正常に動作していることを示します.
securecCRTでサーバにリモート接続できます.
サーバipアドレスを確認します.
mhchen@mhchen-VirtualBox:~$ ifconfig
eth 0のIPアドレス情報が表示されます.
本文は“7743530”のブログから出て、転載して作者と連絡してください!