{"id":824,"date":"2023-03-03T22:37:26","date_gmt":"2023-03-03T14:37:26","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=824"},"modified":"2023-04-29T16:51:44","modified_gmt":"2023-04-29T08:51:44","slug":"robot-framework-remote-login-ssh-operation","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/03\/robot-framework-remote-login-ssh-operation\/","title":{"rendered":"Robot Framework\u8fdc\u7a0b\u767b\u5f55SSH\u64cd\u4f5c"},"content":{"rendered":"<h2>\u5b89\u88c5robotframework-sshlibrary\u5e93<\/h2>\n<ul>\n<li><strong>VCForPython27<\/strong><\/li>\n<\/ul>\n<p>\u4e0b\u8f7d\u5730\u5740\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=44266\">https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=44266<\/a><br \/>\n\u4e0b\u8f7d\u6587\u4ef6\uff1aVCForPython27.msi<\/p>\n<p><!-- more --><\/p>\n<ul>\n<li><strong>paramiko<\/strong><\/li>\n<\/ul>\n<p>\u63d0\u4f9bssh\u53casft\u8fdc\u7a0b\u767b\u5f55\u670d\u52a1\u5668\u6267\u884c\u547d\u4ee4\u548c\u4e0a\u4f20\u4e0b\u8f7d\u6587\u4ef6\u7684\u529f\u80fd<\/p>\n<p>\u8be6\u89c1\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"http:\/\/www.paramiko.org\/installing.html\">http:\/\/www.paramiko.org\/installing.html<\/a><\/p>\n<pre><code class=\"language-shell\">$ pip install paramiko<\/code><\/pre>\n<ul>\n<li><strong>robotframework-sshlibrary<\/strong><\/li>\n<\/ul>\n<p>\u8be6\u89c1\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/pypi.python.org\/pypi\/robotframework-sshlibrary\">https:\/\/pypi.python.org\/pypi\/robotframework-sshlibrary<\/a><\/p>\n<pre><code class=\"language-shell\">$ pip install robotframework-sshlibrary<\/code><\/pre>\n<h2>Robot\u6d4b\u8bd5\u811a\u672c<\/h2>\n<pre><code>*** Settings ***\nLibrary           SSHLibrary\n\n*** Test Cases ***\nSSH\u8fde\u63a5\u53ca\u64cd\u4f5c\n    SSHLibrary.Open Connection    121.40.169.150\n    SSHLibrary.Login    yezhou    ******\n    #\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\n    ${files}    SSHLibrary.Execute Command    ls\n    SSHLibrary.close Connection\n    log    ${files}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5robotframework-sshlibrary\u5e93 VCForPython27 \u4e0b\u8f7d\u5730\u5740\uff1ahttps:\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[228],"tags":[96],"class_list":["post-824","post","type-post","status-publish","format-standard","hentry","category-robot-framework","tag-ssh"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=824"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/824\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}