<em id="0a85b"><option id="0a85b"></option></em>

<abbr id="0a85b"></abbr>

      <nobr id="0a85b"></nobr>
        <tr id="0a85b"></tr>
        9久久伊人精品综合,亚洲一区精品视频在线,成 人免费va视频,国产一区二区三区黄网,99国产精品永久免费视频,亚洲毛片多多影院,精品久久久无码人妻中文字幕,无码国产欧美一区二区三区不卡
        學習啦>學習電腦>操作系統>Linux教程>

        linux ssh命令詳解

        時間: 佳洲1085 分享

          ssh命令是linux下的一個命令,那么它的基本用法是怎樣的呢?下面由學習啦小編為大家整理了linux ssh命令的相關知識,希望對大家有幫助。

          linux ssh命令用法1、查看SSH客戶端版本

          有的時候需要確認一下SSH客戶端及其相應的版本號。使用ssh -V命令可以得到版本號。需要注意的是,Linux一般自帶的是OpenSSH: 下面的例子即表明該系統正在使用OpenSSH:

          $ ssh -V OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003

          下面的例子表明該系統正在使用SSH2:

          $ ssh -V ssh: SSH Secure Shell 3.2.9.1 (non-commercial version) on i686-pc-linux-gnu

          linux ssh命令用法2、用SSH登錄到遠程主機

          當你第一次使用ssh登錄遠程主機時,會出現沒有找到主機密鑰的提示信息。輸入"yes"后,系統會將遠程主機的密鑰加入到你的主目錄下的 .ssh/hostkeys下,這樣你就可以繼續操作了。示例如下:

          1

          2

          3

          4

          5

          6

          7

          8

          localhost$ ssh -l jsmith remotehost.example.com

          Host key not found from database.

          Key fingerprint:

          xabie-dezbc-manud-bartd-satsy-limit-nexiu-jambl-title-jarde-tuxum

          You can get a public key‘s fingerprint by running % ssh-keygen -F publickey.pub on the keyfile.

          Are you sure you want to continue connecting (yes/no)? Yes

          Host key saved to /home/jsmith/.ssh2/hostkeys/key_22_remotehost.example.com.pub host key for remotehost.example.com,

          accepted by jsmith Mon May 26 2008 16:06:50 -0700 jsmith@remotehost.example.com password: remotehost.example.com$

          因為遠程主機的密鑰已經加入到ssh客戶端的已知主機列表中,當你第二次登陸遠程主機時,只需要你輸入遠程主機的登錄密碼即可。

          1

          2

          3

          localhost$ ssh -l jsmith remotehost.example.com

          jsmith@remotehost.example.com password:

          remotehost.example.com$

          由于各種原因,可能在你第一次登陸遠程主機后,該主機的密鑰發生改變,你將會看到一些警告信息。出現這種情況,可能有兩個原因:

          系統管理員在遠程主機上升級或者重新安裝了SSH服務器,有人在進行一些惡意行為,等等。

          在你輸入“yes”之前呢,最佳的選擇或許是聯系你的系統管理員來分析為什么會出現主機驗證碼改變的信息,核對主機驗證碼是否正確。

          localhost$ ssh -l jsmith remotehost.example.com @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

          @ WARNING: HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

          IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

          Someone could be eavesdropping on you right now (man-in-the- middle attack)!

          It is also possible that the host key has just been changed.

          Please contact your system administrator.

          Add correct host key to ―/home/jsmith/.ssh2/hostkeys/key_22_remotehost.example.com.pub‖ to get rid of this message.

          Received server key's fingerprint:

          xabie-dezbc-manud-bartd-satsy-limit-nexiu-jambl-title-arde-tuxum

          You can get a public key's fingerprint by running % ssh-keygen -F publickey.pub on the keyfile.

          Agent forwarding is disabled to avoid attacks by corrupted servers.

          Are you sure you want to continue connecting (yes/no)? yes

          Do you want to change the host key on disk (yes/no)? yes

          Agent forwarding re-enabled.

          Host key saved to /home/jsmith/.ssh2/hostkeys/key_22_remotehost.example.com.pub host key for remotehost.example.com,

          accepted by jsmith Mon May 26 2008 16:17:31 -0700 jsmith @remotehost.example.com's password: remotehost$

          linux ssh命令用法3、調試SSH客戶端會話

          當ssh連接出現問題時,我們需要通過查看調試信息來定位這些錯誤。一般來講使用v選項(注意:是小寫的v),即可查看調試信息。

          沒有SSH客戶端調試信息的例子:

          1localhost$ ssh -l jsmith remotehost.example.com

          2warning: Connecting to remotehost.example.com failed: No address associated to the name

          包含ssh調試信息的例子:

          1locaclhost$ ssh -v -l jsmith remotehost.example.com

          2debug: SshConfig/sshconfig.c:2838/ssh2_parse_config_ext:

          3Metaconfig parsing stopped at line 3.

          4debug: SshConfig/sshconfig.c:637/ssh_config_set_param_verbose:

          5Setting variable 嘠攀爀戀漀猀攀Mode' to FALSE'.

          6debug: SshConfig/sshconfig.c:3130/ssh_config_read_file_ext: Read 17 params from config file.

          7debug: Ssh2/ssh2.c:1707/main: User config file not found, using defaults. (Looked for /home/jsmith/.ssh2/ssh2_config')

          8debug: Connecting to remotehost.example.com, port 22… (SOCKS not used)

          9warning: Connecting to remotehost.example.com failed: No address associated to the name

          [注:很多命令中,v選項對應的英文是 verbose,也就是詳細的信息的意思。]

          當你使用ssh從本機登錄到遠程主機時,你可能希望切換到本地做一些操作,然后再重新回到遠程主機。這個時候,你不需要中斷ssh連接,只需要按照第4點的步驟操作即可:

          linux ssh命令用法4、用SSH退出符切換SSH會話

          這個技巧非常實用。尤其是遠程登陸到一臺主機A,然后從A登陸到B,如果希望在A上做一些操作,還得再開一個終端,很是麻煩。

          當你使用ssh從本機登錄到遠程主機時,你可能希望切換到本地做一些操作,然后再重新回到遠程主機。這個時候,你不需要中斷ssh連接,只需要按照如下步驟操作即可:

          當你已經登錄到了遠程主機時,你可能想要回到本地主機進行一些操作,然后又繼續回到遠程主機。在這種情況下,沒有必要斷開遠程主機的會話,你可以用下面的辦法來完成:

          1.登入遠程主機:

          localhost$ ssh -l jsmith remotehost

          2.已連接遠程主機:

          remotehost$

          3.要臨時回到本地主機,輸入退出符號:“~”與“Control-Z”組合。

          當你輸入“~”你不會立即在屏幕上看到,當你按下并且按回車之后才一起顯示。如下,在遠程主機中以此輸入“~

          remotehost$ ~^Z [1]+ Stopped ssh -l jsmith remotehost localhost$

          4.現在你已經退回到了本地主機,ssh遠程客戶端會話就在UNIX后臺中運行,你可以向下面那樣查看它:

          localhost$ jobs [1]+ Stopped ssh -l jsmith remotehost

          5. 你可以將后臺運行的ssh會話進程切換到前臺,重新回到遠程主機,而無需輸入密碼

          localhost$ fg %1 ssh -l jsmith remotehost remotehost$

          linux ssh命令用法5、用SSH退出字符會話,顯示信息

          要想取得一些關于當前會話有用的信息,可以按以下方式完成。不過這只能在SSH 2 客戶端上使用。

          登錄到遠程服務器

          localhost$ ssh -l jsmith remotehost

          如下所示,在遠程服務器上,輸入ssh退出字符~并輸入s。這樣會顯示出很多有關當前ssh連接的有用信息

          1remotehost$ [注:當你在命令行上輸入~s時,它是不可見的.]

          2remote host: remotehost

          3local host: localhost

          4remote version: SSH-1.99-OpenSSH_3.9p1

          5local version: SSH-2.0-3.2.9.1 SSH Secure Shell (non-commercial)

          6compressed bytes in: 1506

          7uncompressed bytes in: 1622

          8compressed bytes out: 4997

          9uncompressed bytes out: 5118

          10packets in: 15

          11packets out: 24

          12rekeys: 0

          13Algorithms:

          14Chosen key exchange algorithm: diffie-hellman-group1-sha1

          15Chosen host key algorithm: ssh-dss

          16Common host key algorithms: ssh-dss,ssh-rsa

          17Algorithms client to server:

          18Cipher: aes128-cbc

          19MAC: hmac-sha1

          20Compression: zlib

          21Algorithms server to client:

          22Cipher: aes128-cbc MAC: hmac-sha1

          23Compression: zlib

          24localhost$

          以上就是Linux下SSH的詳細使用方法,希望能夠對你有所幫助。

        3580988 主站蜘蛛池模板: 公与淑婷厨房猛烈进出视频免费 | 永久免费精品性爱网站| 国产精品 欧美激情 在线播放| 无码欧美毛片一区二区三| 欧美奶涨边摸边做爰视频| 香蕉久久国产超碰青草| 九色精品在线| 东方av四虎在线观看| 狠狠色丁香久久婷婷综合五月| 久久精品免视看成人国产| 在线a级毛片免费视频| 国产成人精品亚洲午夜| 国产福利萌白酱在线观看视频| 亚洲欧美色αv在线影视| 天堂av最新版中文在线| 老司机精品成人无码AV| 青青草成人免费自拍视频| 免费看的一级毛片| 最近中文国语字幕在线播放| 国产日韩精品秘 入口| 99久热这里精品免费观看| 亚洲精品一区二区美女| 人妻丰满熟妇ⅴ无码区a片| 亚洲偷自拍另类一区二区| 无码一级视频在线| 熟女熟妇乱女乱妇综合网| 亚洲精品视频免费| 97精品人妻系列无码人妻| 做暖暖视频在线看片免费| 亚洲午夜成人精品电影在线观看| 97视频精品全国免费观看| 国内露脸互换人妻| 中文字幕结果国产精品| 蜜桃视频一区二区在线看| 粉嫩在线一区二区三区视频| 欧洲码亚洲码的区别入口| 一本大道av人久久综合| 免费区欧美一级猛片| 久热这里只有精品视频3| 久久精品国产亚洲av电影| 电视剧在线观看|