Agenda: SSH-with-private_public-key-authentication.htm

File SSH-with-private_public-key-authentication.htm, 36.7 KB (added by pmatsiko, 5 years ago)
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml"><head>
3  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4  <meta http-equiv="Content-Style-Type" content="text/css">
5  <meta name="generator" content="pandoc">
6  <title>SSH with private/public key authentication</title>
7  <style type="text/css">code{white-space: pre;}</style>
8  <link href="data:text/css,%2F%2A%0A%20%20%20%20Buttondown%0A%20%20%20%20A%20Markdown%2FMultiMarkdown%2FPandoc%20HTML%20output%20CSS%20stylesheet%0A%20%20%20%20Author%3A%20Ryan%20Gray%0A%20%20%20%20Date%3A%2015%20Feb%202011%0A%20%20%20%20Revised%3A%2021%20Feb%202012%0A%20%20%20%0A%20%20%20%20General%20style%20is%20clean%2C%20with%20minimal%20re%2Ddefinition%20of%20the%20defaults%20or%20%0A%20%20%20%20overrides%20of%20user%20font%20settings%2E%20The%20body%20text%20and%20header%20styles%20are%20%0A%20%20%20%20left%20alone%20except%20title%2C%20author%20and%20date%20classes%20are%20centered%2E%20A%20Pandoc%20TOC%20%0A%20%20%20%20is%20not%20printed%2C%20URLs%20are%20printed%20after%20hyperlinks%20in%20parentheses%2E%20%0A%20%20%20%20Block%20quotes%20are%20italicized%2E%20Tables%20are%20lightly%20styled%20with%20lines%20above%20%0A%20%20%20%20and%20below%20the%20table%20and%20below%20the%20header%20with%20a%20boldface%20header%2E%20Code%20%0A%20%20%20%20blocks%20are%20line%20wrapped%2E%20%0A%20%0A%20%20%20%20All%20elements%20that%20Pandoc%20and%20MultiMarkdown%20use%20should%20be%20listed%20here%2C%20even%20%0A%20%20%20%20if%20the%20style%20is%20empty%20so%20you%20can%20easily%20add%20styling%20to%20anything%2E%0A%20%20%20%20%0A%20%20%20%20There%20are%20some%20elements%20in%20here%20for%20HTML5%20output%20of%20Pandoc%2C%20but%20I%20have%20not%20%0A%20%20%20%20gotten%20around%20to%20testing%20that%20yet%2E%0A%2A%2F%0A%20%0A%2F%2A%20NOTES%3A%0A%20%0A%20%20%20%20Stuff%20tried%20and%20failed%3A%0A%20%20%20%20%0A%20%20%20%20It%20seems%20that%20specifying%20font%2Dfamily%3Aserif%20in%20Safari%20will%20always%20use%20%0A%20%20%20%20Times%20New%20Roman%20rather%20than%20the%20user%27s%20preferences%20setting%2E%0A%20%20%20%20%0A%20%20%20%20Making%20the%20font%20size%20different%20or%20a%20fixed%20value%20for%20print%20in%20case%20the%20screen%20%0A%20%20%20%20font%20size%20is%20making%20the%20print%20font%20too%20big%3A%20Making%20font%2Dsize%20different%20for%20%0A%20%20%20%20print%20than%20for%20screen%20causes%20horizontal%20lines%20to%20disappear%20in%20math%20when%20using%20%0A%20%20%20%20MathJax%20under%20Safari%2E%0A%2A%2F%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Front%20Matter%20%2D%2D%2D%2D%20%2A%2F%0A%20%0A%2F%2A%20Pandoc%20header%20DIV%2E%20Contains%20%2Etitle%2C%20%2Eauthor%20and%20%2Edate%2E%20Comes%20before%20div%23TOC%2E%20%0A%20%20%20Only%20appears%20if%20one%20of%20those%20three%20are%20in%20the%20document%2E%0A%2A%2F%0A%20%0Adiv%23header%2C%20header%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Put%20border%20on%20bottom%2E%20Separates%20it%20from%20TOC%20or%20body%20that%20comes%20after%20it%2E%20%2A%2F%0A%20%20%20%20border%2Dbottom%3A%201px%20solid%20%23aaa%3B%0A%20%20%20%20margin%2Dbottom%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%0A%2Etitle%20%2F%2A%20Pandoc%20title%20header%20%28h1%2Etitle%29%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20text%2Dalign%3A%20center%3B%0A%20%20%20%20%7D%0A%20%0A%2Eauthor%2C%20%2Edate%20%2F%2A%20Pandoc%20author%28s%29%20and%20date%20headers%20%28h2%2Eauthor%20and%20h3%2Edate%29%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20text%2Dalign%3A%20center%3B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20Pandoc%20table%20of%20contents%20DIV%20when%20using%20the%20%2D%2Dtoc%20option%2E%0A%20%20%20NOTE%3A%20this%20doesn%27t%20support%20Pandoc%27s%20%2D%2Did%2Dprefix%20option%20for%20%23TOC%20and%20%23header%2E%20%0A%20%20%20Probably%20would%20need%20to%20use%20div%5Bid%24%3D%27TOC%27%5D%20and%20div%5Bid%24%3D%27header%27%5D%20as%20selectors%2E%0A%2A%2F%0A%20%0Adiv%23TOC%2C%20nav%23TOC%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Put%20border%20on%20bottom%20to%20separate%20it%20from%20body%2E%20%2A%2F%0A%20%20%20%20border%2Dbottom%3A%201px%20solid%20%23aaa%3B%0A%20%20%20%20margin%2Dbottom%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%0A%40media%20print%0A%20%20%20%20%7B%0A%20%20%20%20div%23TOC%2C%20nav%23TOC%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20Don%27t%20display%20TOC%20in%20print%20%2A%2F%0A%20%20%20%20%20%20%20%20display%3A%20none%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Headers%20and%20sections%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Ah1%2C%20h2%2C%20h3%2C%20h4%2C%20h5%2C%20h6%0A%7B%0A%20%20%20%20font%2Dfamily%3A%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20%22Liberation%20Sans%22%2C%20Calibri%2C%20Arial%2C%20sans%2Dserif%3B%20%2F%2A%20Sans%2Dserif%20headers%20%2A%2F%0A%20%0A%20%20%20%20%2F%2A%20font%2Dfamily%3A%20%22Liberation%20Serif%22%2C%20%22Georgia%22%2C%20%22Times%20New%20Roman%22%2C%20serif%3B%20%2F%2A%20Serif%20headers%20%2A%2F%0A%20%0A%20%20%20%20page%2Dbreak%2Dafter%3A%20avoid%3B%20%2F%2A%20Firefox%2C%20Chrome%2C%20and%20Safari%20do%20not%20support%20the%20property%20value%20%22avoid%22%20%2A%2F%0A%7D%0A%20%0A%2F%2A%20Pandoc%20with%20%2D%2Dsection%2Ddivs%20option%20%2A%2F%0A%20%0Adiv%20div%2C%20section%20section%20%2F%2A%20Nested%20sections%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20margin%2Dleft%3A%202em%3B%20%2F%2A%20This%20will%20increasingly%20indent%20nested%20header%20sections%20%2A%2F%0A%20%20%20%20%7D%0A%20%0Ap%20%7B%7D%0A%20%0Ablockquote%0A%20%20%20%20%7B%20%0A%20%20%20%20font%2Dstyle%3A%20italic%3B%0A%20%20%20%20%7D%0A%20%0Ali%20%2F%2A%20All%20list%20items%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Ali%20%3E%20p%20%2F%2A%20Loosely%20spaced%20list%20item%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20margin%2Dtop%3A%201em%3B%20%2F%2A%20IE%3A%20lack%20of%20space%20above%20a%20%3Cli%3E%20when%20the%20item%20is%20inside%20a%20%3Cp%3E%20%2A%2F%0A%20%20%20%20%7D%0A%20%0Aul%20%2F%2A%20Whole%20unordered%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Aul%20li%20%2F%2A%20Unordered%20list%20item%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Aol%20%2F%2A%20Whole%20ordered%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Aol%20li%20%2F%2A%20Ordered%20list%20item%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Ahr%20%7B%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Some%20span%20elements%20%2D%2D%2D%20%2A%2F%0A%20%0Asub%20%2F%2A%20Subscripts%2E%20Pandoc%3A%20H%7E2%7EO%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Asup%20%2F%2A%20Superscripts%2E%20Pandoc%3A%20The%202%5End%5E%20try%2E%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%20%20%20%0Aem%20%2F%2A%20Emphasis%2E%20Markdown%3A%20%2Aemphasis%2A%20or%20%5Femphasis%5F%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%20%20%20%0Aem%20%3E%20em%20%2F%2A%20Emphasis%20within%20emphasis%3A%20%2AThis%20is%20all%20%2Aemphasized%2A%20except%20that%2A%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20font%2Dstyle%3A%20normal%3B%0A%20%20%20%20%7D%0A%20%0Astrong%20%2F%2A%20Markdown%20%2A%2Astrong%2A%2A%20or%20%5F%5Fstrong%5F%5F%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Links%20%28anchors%29%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Aa%20%2F%2A%20All%20links%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Keep%20links%20clean%2E%20On%20screen%2C%20they%20are%20colored%3B%20in%20print%2C%20they%20do%20nothing%20anyway%2E%20%2A%2F%0A%20%20%20%20text%2Ddecoration%3A%20none%3B%0A%20%20%20%20%7D%0A%20%0A%40media%20screen%0A%20%20%20%20%7B%0A%20%20%20%20a%3Ahover%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20On%20hover%2C%20we%20indicate%20a%20bit%20more%20that%20it%20is%20a%20link%2E%20%2A%2F%0A%20%20%20%20%20%20%20%20text%2Ddecoration%3A%20underline%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%0A%40media%20print%0A%20%20%20%20%7B%0A%20%20%20%20a%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20In%20print%2C%20a%20colored%20link%20is%20useless%2C%20so%20un%2Dstyle%20it%2E%20%2A%2F%0A%20%20%20%20%20%20%20%20color%3A%20black%3B%0A%20%20%20%20%20%20%20%20background%3A%20transparent%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20a%5Bhref%5E%3D%22http%3A%2F%2F%22%5D%3Aafter%2C%20a%5Bhref%5E%3D%22https%3A%2F%2F%22%5D%3Aafter%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20However%2C%20links%20that%20go%20somewhere%20else%2C%20might%20be%20useful%20to%20the%20reader%2C%0A%20%20%20%20%20%20%20%20%20%20%20so%20for%20http%20and%20https%20links%2C%20print%20the%20URL%20after%20what%20was%20the%20link%20%0A%20%20%20%20%20%20%20%20%20%20%20text%20in%20parens%0A%20%20%20%20%20%20%20%20%2A%2F%0A%20%20%20%20%20%20%20%20content%3A%20%22%20%28%22%20attr%28href%29%20%22%29%20%22%3B%0A%20%20%20%20%20%20%20%20font%2Dsize%3A%2090%25%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Images%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Aimg%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Let%20it%20be%20inline%20left%2Fright%20where%20it%20wants%20to%20be%2C%20but%20verticality%20make%20%0A%20%20%20%20%20%20%20it%20in%20the%20middle%20to%20look%20nicer%2C%20but%20opinions%20differ%2C%20and%20if%20in%20a%20multi%2Dline%20%0A%20%20%20%20%20%20%20paragraph%2C%20it%20might%20not%20be%20so%20great%2E%20%0A%20%20%20%20%2A%2F%0A%20%20%20%20vertical%2Dalign%3A%20middle%3B%0A%20%20%20%20%7D%0A%20%0Adiv%2Efigure%20%2F%2A%20Pandoc%20figure%2Dstyle%20image%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Center%20the%20image%20and%20caption%20%2A%2F%0A%20%20%20%20margin%2Dleft%3A%20auto%3B%0A%20%20%20%20margin%2Dright%3A%20auto%3B%0A%20%20%20%20text%2Dalign%3A%20center%3B%0A%20%20%20%20font%2Dstyle%3A%20italic%3B%0A%20%20%20%20%7D%0A%20%0Ap%2Ecaption%20%2F%2A%20Pandoc%20figure%2Dstyle%20caption%20within%20div%2Efigure%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Inherits%20div%2Efigure%20props%20by%20default%20%2A%2F%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Code%20blocks%20and%20spans%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Apre%2C%20code%20%0A%20%20%20%20%7B%0A%20%20%20%20background%2Dcolor%3A%20%23fdf7ee%3B%0A%20%20%20%20%2F%2A%20BEGIN%20word%20wrap%20%2A%2F%0A%20%20%20%20%2F%2A%20Need%20all%20the%20following%20to%20word%20wrap%20instead%20of%20scroll%20box%20%2A%2F%0A%20%20%20%20%2F%2A%20This%20will%20override%20the%20overflow%3Aauto%20if%20present%20%2A%2F%0A%20%20%20%20white%2Dspace%3A%20pre%2Dwrap%3B%20%2F%2A%20css%2D3%20%2A%2F%0A%20%20%20%20white%2Dspace%3A%20%2Dmoz%2Dpre%2Dwrap%20%21important%3B%20%2F%2A%20Mozilla%2C%20since%201999%20%2A%2F%0A%20%20%20%20white%2Dspace%3A%20%2Dpre%2Dwrap%3B%20%2F%2A%20Opera%204%2D6%20%2A%2F%0A%20%20%20%20white%2Dspace%3A%20%2Do%2Dpre%2Dwrap%3B%20%2F%2A%20Opera%207%20%2A%2F%0A%20%20%20%20word%2Dwrap%3A%20break%2Dword%3B%20%2F%2A%20Internet%20Explorer%205%2E5%2B%20%2A%2F%0A%20%20%20%20%2F%2A%20END%20word%20wrap%20%2A%2F%0A%20%20%20%20%7D%0A%20%0Apre%20%2F%2A%20Code%20blocks%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Distinguish%20pre%20blocks%20from%20other%20text%20by%20more%20than%20the%20font%20with%20a%20background%20tint%2E%20%2A%2F%0A%20%20%20%20padding%3A%200%2E5em%3B%20%2F%2A%20Since%20we%20have%20a%20background%20color%20%2A%2F%0A%20%20%20%20border%2Dradius%3A%205px%3B%20%2F%2A%20Softens%20it%20%2A%2F%0A%20%20%20%20%2F%2A%20Give%20it%20a%20some%20definition%20%2A%2F%0A%20%20%20%20border%3A%201px%20solid%20%23aaa%3B%0A%20%20%20%20%2F%2A%20Set%20it%20off%20left%20and%20right%2C%20seems%20to%20look%20a%20bit%20nicer%20when%20we%20have%20a%20background%20%2A%2F%0A%20%20%20%20margin%2Dleft%3A%20%200%2E5em%3B%0A%20%20%20%20margin%2Dright%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%0A%40media%20screen%0A%20%20%20%20%7B%0A%20%20%20%20pre%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20On%20screen%2C%20use%20an%20auto%20scroll%20box%20for%20long%20lines%2C%20unless%20word%2Dwrap%20is%20enabled%20%2A%2F%0A%20%20%20%20%20%20%20%20white%2Dspace%3A%20pre%3B%0A%20%20%20%20%20%20%20%20overflow%3A%20auto%3B%0A%20%20%20%20%20%20%20%20%2F%2A%20Dotted%20looks%20better%20on%20screen%20and%20solid%20seems%20to%20print%20better%2E%20%2A%2F%0A%20%20%20%20%20%20%20%20border%3A%201px%20dotted%20%23777%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%0Acode%20%2F%2A%20All%20inline%20code%20spans%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Ap%20%3E%20code%2C%20li%20%3E%20code%20%2F%2A%20Code%20spans%20in%20paragraphs%20and%20tight%20lists%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Pad%20a%20little%20from%20adjacent%20text%20%2A%2F%0A%20%20%20%20padding%2Dleft%3A%20%202px%3B%0A%20%20%20%20padding%2Dright%3A%202px%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0Ali%20%3E%20p%20code%20%2F%2A%20Code%20span%20in%20a%20loose%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20We%20have%20room%20for%20some%20more%20background%20color%20above%20and%20below%20%2A%2F%0A%20%20%20%20padding%3A%202px%3B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Math%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Aspan%2Emath%20%2F%2A%20Pandoc%20inline%20math%20default%20and%20%2D%2Djsmath%20inline%20math%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Tried%20font%2Dstyle%3Aitalic%20here%2C%20and%20it%20messed%20up%20MathJax%20rendering%20in%20some%20browsers%2E%20Maybe%20don%27t%20mess%20with%20at%20all%2E%20%2A%2F%0A%20%20%20%20%7D%0A%20%20%20%20%0Adiv%2Emath%20%2F%2A%20Pandoc%20%2D%2Djsmath%20display%20math%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%20%20%20%0Aspan%2ELaTeX%20%2F%2A%20Pandoc%20%2D%2Dlatexmathml%20math%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%20%0A%20%0Aeq%20%2F%2A%20Pandoc%20%2D%2Dgladtex%20math%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%20%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Tables%20%2D%2D%2D%2D%20%2A%2F%0A%20%0A%2F%2A%20%20A%20clean%20textbook%2Dlike%20style%20with%20horizontal%20lines%20above%20and%20below%20and%20under%20%0A%20%20%20%20the%20header%2E%20Rows%20highlight%20on%20hover%20to%20help%20scanning%20the%20table%20on%20screen%2E%0A%2A%2F%0A%20%0Atable%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dcollapse%3A%20collapse%3B%0A%20%20%20%20border%2Dspacing%3A%200%3B%20%2F%2A%20IE%206%20%2A%2F%0A%20%0A%20%20%20%20border%2Dbottom%3A%202pt%20solid%20%23000%3B%0A%20%20%20%20border%2Dtop%3A%202pt%20solid%20%23000%3B%20%2F%2A%20The%20caption%20on%20top%20will%20not%20have%20a%20bottom%2Dborder%20%2A%2F%0A%20%0A%20%20%20%20%2F%2A%20Center%20%2A%2F%0A%20%20%20%20margin%2Dleft%3A%20auto%3B%0A%20%20%20%20margin%2Dright%3A%20auto%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0Athead%20%2F%2A%20Entire%20table%20header%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dbottom%3A%201pt%20solid%20%23000%3B%0A%20%20%20%20background%2Dcolor%3A%20%23eee%3B%20%2F%2A%20Does%20this%20BG%20print%20well%3F%20%2A%2F%0A%20%20%20%20%7D%0A%20%0Atr%2Eheader%20%2F%2A%20Each%20header%20row%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%20%0A%20%0Atbody%20%2F%2A%20Entire%20table%20%20body%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20Table%20body%20rows%20%2A%2F%0A%20%0Atr%20%20%7B%0A%20%20%20%20%7D%0Atr%2Eodd%3Ahover%2C%20tr%2Eeven%3Ahover%20%2F%2A%20Use%20%2Eodd%20and%20%2Eeven%20classes%20to%20avoid%20styling%20rows%20in%20other%20tables%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20background%2Dcolor%3A%20%23eee%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0A%2F%2A%20Odd%20and%20even%20rows%20%2A%2F%0Atr%2Eodd%20%7B%7D%0Atr%2Eeven%20%7B%7D%0A%20%0Atd%2C%20th%20%2F%2A%20Table%20cells%20and%20table%20header%20cells%20%2A%2F%0A%20%20%20%20%7B%20%0A%20%20%20%20vertical%2Dalign%3A%20top%3B%20%2F%2A%20Word%20%2A%2F%0A%20%20%20%20vertical%2Dalign%3A%20baseline%3B%20%2F%2A%20Others%20%2A%2F%0A%20%20%20%20padding%2Dleft%3A%20%20%200%2E5em%3B%0A%20%20%20%20padding%2Dright%3A%20%200%2E5em%3B%0A%20%20%20%20padding%2Dtop%3A%20%20%20%200%2E2em%3B%0A%20%20%20%20padding%2Dbottom%3A%200%2E2em%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0A%2F%2A%20Removes%20padding%20on%20left%20and%20right%20of%20table%20for%20a%20tight%20look%2E%20Good%20if%20thead%20has%20no%20background%20color%2A%2F%0A%2F%2A%0Atr%20td%3Alast%2Dchild%2C%20tr%20th%3Alast%2Dchild%0A%20%20%20%20%7B%0A%20%20%20%20padding%2Dright%3A%200%3B%0A%20%20%20%20%7D%0Atr%20td%3Afirst%2Dchild%2C%20tr%20th%3Afirst%2Dchild%20%0A%20%20%20%20%7B%0A%20%20%20%20padding%2Dleft%3A%200%3B%0A%20%20%20%20%7D%0A%2A%2F%0A%20%0Ath%20%2F%2A%20Table%20header%20cells%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20font%2Dweight%3A%20bold%3B%20%0A%20%20%20%20%7D%0A%20%0Atfoot%20%2F%2A%20Table%20footer%20%28what%20appears%20here%20if%20caption%20is%20on%20top%3F%29%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Acaption%20%2F%2A%20This%20is%20for%20a%20table%20caption%20tag%2C%20not%20the%20p%2Ecaption%20Pandoc%20uses%20in%20a%20div%2Efigure%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20caption%2Dside%3A%20top%3B%0A%20%20%20%20border%3A%20none%3B%0A%20%20%20%20font%2Dsize%3A%200%2E9em%3B%0A%20%20%20%20font%2Dstyle%3A%20italic%3B%0A%20%20%20%20text%2Dalign%3A%20center%3B%0A%20%20%20%20margin%2Dbottom%3A%200%2E3em%3B%20%2F%2A%20Good%20for%20when%20on%20top%20%2A%2F%0A%20%20%20%20padding%2Dbottom%3A%200%2E2em%3B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Definition%20lists%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Adl%20%2F%2A%20The%20whole%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dtop%3A%202pt%20solid%20black%3B%0A%20%20%20%20padding%2Dtop%3A%200%2E5em%3B%0A%20%20%20%20border%2Dbottom%3A%202pt%20solid%20black%3B%0A%20%20%20%20%7D%0A%20%0Adt%20%2F%2A%20Definition%20term%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20font%2Dweight%3A%20bold%3B%0A%20%20%20%20%7D%0A%20%0Add%2Bdt%20%2F%2A%202nd%20or%20greater%20term%20in%20the%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dtop%3A%201pt%20solid%20black%3B%0A%20%20%20%20padding%2Dtop%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0Add%20%2F%2A%20A%20definition%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20margin%2Dbottom%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%0Add%2Bdd%20%2F%2A%202nd%20or%20greater%20definition%20of%20a%20term%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dtop%3A%201px%20solid%20black%3B%20%2F%2A%20To%20separate%20multiple%20definitions%20%2A%2F%0A%20%20%20%20%7D%0A%20%20%20%20%0A%2F%2A%20%2D%2D%2D%2D%20Footnotes%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Aa%2Efootnote%2C%20a%2EfootnoteRef%20%7B%20%2F%2A%20Pandoc%2C%20MultiMarkdown%20footnote%20links%20%2A%2F%0A%20%20%20%20font%2Dsize%3A%20small%3B%20%0A%20%20%20%20vertical%2Dalign%3A%20text%2Dtop%3B%0A%7D%0A%20%0Aa%5Bhref%5E%3D%22%23fnref%22%5D%2C%20a%2Ereversefootnote%20%2F%2A%20Pandoc%2C%20MultiMarkdown%2C%20%3F%3F%20footnote%20back%20links%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0A%40media%20print%0A%20%20%20%20%7B%0A%20%20%20%20a%5Bhref%5E%3D%22%23fnref%22%5D%2C%20a%2Ereversefootnote%20%2F%2A%20Pandoc%2C%20MultiMarkdown%20%2A%2F%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20Don%27t%20display%20these%20at%20all%20in%20print%20since%20the%20arrow%20is%20only%20something%20to%20click%20on%20%2A%2F%0A%20%20%20%20%20%20%20%20display%3A%20none%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20%0Adiv%2Efootnotes%20%2F%2A%20Pandoc%20footnotes%20div%20at%20end%20of%20the%20document%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%20%20%20%0Adiv%2Efootnotes%20li%5Bid%5E%3D%22fn%22%5D%20%2F%2A%20A%20footnote%20item%20within%20that%20div%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20You%20can%20class%20stuff%20as%20%22noprint%22%20to%20not%20print%2E%20%0A%20%20%20Useful%20since%20you%20can%27t%20set%20this%20media%20conditional%20inside%20an%20HTML%20element%27s%20%0A%20%20%20style%20attribute%20%28I%20think%29%2C%20and%20you%20don%27t%20want%20to%20make%20another%20stylesheet%20that%20%0A%20%20%20imports%20this%20one%20and%20adds%20a%20class%20just%20to%20do%20this%2E%0A%2A%2F%0A%20%0A%40media%20print%0A%20%20%20%20%7B%0A%20%20%20%20%2Enoprint%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20display%3Anone%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A" rel="stylesheet" type="text/css">
9</head>
10<body>
11<div id="header">
12<h1 class="title">SSH with private/public key authentication</h1>
13</div>
14<div id="TOC">
15<ul>
16<li><a href="#introduction"><span class="toc-section-number">1</span> Introduction</a><ul>
17<li><a href="#goals"><span class="toc-section-number">1.1</span> Goals</a></li>
18<li><a href="#notes"><span class="toc-section-number">1.2</span> Notes</a></li>
19</ul></li>
20<li><a href="#for-laptops-running-windows"><span class="toc-section-number">2</span> For laptops running Windows</a><ul>
21<li><a href="#generate-an-ssh-publicprivate-key-pair"><span class="toc-section-number">2.1</span> Generate an ssh public/private key pair</a></li>
22<li><a href="#copy-the-public-key-onto-your-unix-server"><span class="toc-section-number">2.2</span> Copy the PUBLIC key onto your Unix server</a><ul>
23<li><a href="#copy-paste"><span class="toc-section-number">2.2.1</span> Copy-paste</a></li>
24<li><a href="#alternative-way-if-youre-having-problems-with-copy-paste"><span class="toc-section-number">2.2.2</span> Alternative way (if you're having problems with copy-paste)</a></li>
25</ul></li>
26<li><a href="#login-using-your-private-key"><span class="toc-section-number">2.3</span> Login using your private key</a></li>
27<li><a href="#repeat-for-additional-hosts"><span class="toc-section-number">2.4</span> Repeat for additional hosts</a></li>
28</ul></li>
29<li><a href="#for-laptops-running-linux-or-bsd-or-osx"><span class="toc-section-number">3</span> For laptops running Linux (or BSD or OSX)</a><ul>
30<li><a href="#generate-an-ssh-publicprivate-key-pair-1"><span class="toc-section-number">3.1</span> Generate an ssh public/private key pair</a></li>
31<li><a href="#copy-the-public-key-onto-your-unix-server-1"><span class="toc-section-number">3.2</span> Copy the PUBLIC key onto your Unix server</a></li>
32<li><a href="#login-using-your-private-key-1"><span class="toc-section-number">3.3</span> Login using your private key</a></li>
33<li><a href="#repeat-for-additional-hosts-1"><span class="toc-section-number">3.4</span> Repeat for additional hosts</a></li>
34</ul></li>
35<li><a href="#troubleshooting"><span class="toc-section-number">4</span> Troubleshooting</a></li>
36<li><a href="#disabling-password-authentication"><span class="toc-section-number">5</span> Disabling password authentication</a></li>
37<li><a href="#optional-exercises"><span class="toc-section-number">6</span> Optional exercises</a><ul>
38<li><a href="#allowing-root-access"><span class="toc-section-number">6.1</span> Allowing root access</a></li>
39<li><a href="#multiple-keys-on-the-same-account"><span class="toc-section-number">6.2</span> Multiple keys on the same account</a></li>
40</ul></li>
41</ul>
42</div>
43<h1 id="introduction"><a href="#introduction"><span class="header-section-number">1</span> Introduction</a></h1>
44<h2 id="goals"><a href="#goals"><span class="header-section-number">1.1</span> Goals</a></h2>
45<p>In this exercise we'll show how you can eliminate passwords by using ssh key authentication.</p>
46<h2 id="notes"><a href="#notes"><span class="header-section-number">1.2</span> Notes</a></h2>
47<ul>
48<li>Commands preceded with "$" imply that you should execute the command as a general user - not as root.</li>
49<li>Commands preceded with "#" imply that you should be working as root.</li>
50</ul>
51<p>Choose the version of the exercises depending on what OS you are running on your laptop.</p>
52<h1 id="for-laptops-running-windows"><a href="#for-laptops-running-windows"><span class="header-section-number">2</span> For laptops running Windows</a></h1>
53<p>Download the following onto your desktop or into a downloads folder:</p>
54<ul>
55<li>putty.exe</li>
56<li>psftp.exe</li>
57<li>pageant.exe</li>
58<li>puttygen.exe</li>
59</ul>
60<p>(Or you can try the installer bundle <code>putty.zip</code> which gets them all)</p>
61<p>During the workshop only, you can download these from the local mirror at <a href="http://noc.ws.nsrc.org/downloads/putty/">http://noc.ws.nsrc.org/downloads/putty/</a></p>
62<p>The home site is <a href="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html">http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html</a></p>
63<h2 id="generate-an-ssh-publicprivate-key-pair"><a href="#generate-an-ssh-publicprivate-key-pair"><span class="header-section-number">2.1</span> Generate an ssh public/private key pair</a></h2>
64<p>Double-click on <code>puttygen.exe</code></p>
65<p>At the bottom of the dialog box, under "Parameters":</p>
66<ul>
67<li>Make sure the type of key to generate is "SSH-2 RSA"</li>
68<li>Set the number of bits to 2048</li>
69</ul>
70<p>Click on "Generate". Move the mouse randomly over the blank area until the progress bar reaches 100%</p>
71<pre><code>    Key comment:        [Your Name &lt;your@email.address&gt;   ]
72    Key passphrase:     [chooose a passphrase             ]
73    Confirm passphrase: [choose same passphrase           ]</code></pre>
74<p>The passphrase is used to keep your private key encrypted on disk. It
75 can be pretty much anything you want and as long as you want -
76including spaces - but if you forget it, your key becomes worthless. For
77 now pick something that you will easily remember. You can change it at
78any time you want in the future.</p>
79<p>Click "Save public key". Give a filename of "id_rsa.pub" (please save
80 files into the same directory as where the executables are)</p>
81<p>Click "Save private key". Give a filename of "id_rsa.ppk"</p>
82<p>Use the mouse to highlight all the text in the box "Public key for
83pasting into OpenSSH authorized_keys file", and copy it to the
84clipboard.</p>
85<p>Open up notepad, and paste the key file into the clipboard, and save
86this as "id_rsa.pub.openssh". Now if you need an OpenSSH formatted key
87you can retrieve it from this file.</p>
88<p>Exit puttygen.</p>
89<p>NOTE: Key generation is a one-off exercise. The more you deploy your
90public key, the more work it to be if you were to lose it and have to
91start again with a new one. Thus it is important to make sure you don't
92lose access to your private key. I suggest you keep a secure backup of
93the private key somewhere, e.g. on a CD-ROM that you lock away.</p>
94<h2 id="copy-the-public-key-onto-your-unix-server"><a href="#copy-the-public-key-onto-your-unix-server"><span class="header-section-number">2.2</span> Copy the PUBLIC key onto your Unix server</a></h2>
95<p>You have two ways of doing this.</p>
96<h3 id="copy-paste"><a href="#copy-paste"><span class="header-section-number">2.2.1</span> Copy-paste</a></h3>
97<p>Use putty.exe to make a normal ssh connection to your host as the 'sysadm' user.</p>
98<pre><code>$ cat &gt;&gt;.ssh/authorized_keys
99    *** PASTE KEY FROM CLIPBOARD ***
100    *** In putty, right click to paste, or press shift-insert ***
101    *** If the cursor is still at the end of the line, hit Enter ***
102    *** hit ctrl-D ***</code></pre>
103<p>The key consists of one very long line, which looks like</p>
104<pre><code>ssh-rsa &lt;lots of base64 data&gt; &lt;comment&gt;</code></pre>
105<p>As a quick check that it hasn't been corrupted, look at the contents of the file:</p>
106<pre><code>$ less -S .ssh/authorized_keys</code></pre>
107<p>Every line of the file should begin with "ssh-dss" or "ssh-rsa". If any lines don't start this way, speak with an instructor.</p>
108<p>Now logout.</p>
109<h3 id="alternative-way-if-youre-having-problems-with-copy-paste"><a href="#alternative-way-if-youre-having-problems-with-copy-paste"><span class="header-section-number">2.2.2</span> Alternative way (if you're having problems with copy-paste)</a></h3>
110<p>Double-click on psftp.exe. Open a connection to your server, and upload your public key:</p>
111<pre><code>psftp&gt; open hostN.ws.nsrc.org
112login as: sysadm
113sysadm@hostN.ws.nsrc.org's password: &lt;usual one&gt;
114Remote working directory is /home/sysadm
115psftp&gt; put id_rsa.pub
116local:id_rsa.pub =&gt; remote:/home/sysadm/id_rsa.pub
117psftp&gt; quit</code></pre>
118<p>Unfortunately, this public key is not in the format which openssh
119requires, so now login again using putty.exe, and use the following
120command to convert it and put it in the right place.</p>
121<pre><code>$ ssh-keygen -i -f id_rsa.pub &gt;&gt;.ssh/authorized_keys</code></pre>
122<h2 id="login-using-your-private-key"><a href="#login-using-your-private-key"><span class="header-section-number">2.3</span> Login using your private key</a></h2>
123<p>Start putty.exe again. Enter the hostname as usual, but before
124clicking Open, browse in the left hand column to Connection &gt; SSH
125&gt; Auth</p>
126<pre><code>    [-] Connection
127         |
128        [-] SSH
129         |  |- Keyex
130         |  |- Auth    &lt;--- CLICK HERE</code></pre>
131<p>Next to "Private key for authentication", click Browse. Find your <code>id_rsa.ppk</code> file, open it, then click Open to start the connection.</p>
132<p>You should be prompted for your username as before (sysadm), but then
133 instead of being prompted for a password, you are asked for the
134passphrase for your private key. Enter it, and you should be logged in.</p>
135<p>This is quite painful (both locating the private key and entering the
136 passphrase), so later we're going to automate it using an agent.</p>
137<h2 id="repeat-for-additional-hosts"><a href="#repeat-for-additional-hosts"><span class="header-section-number">2.4</span> Repeat for additional hosts</a></h2>
138<p>If you have been given multiple hosts to use, now copy your public
139key to each of those other hosts, and check that you can use the same
140private key to log in to each of them. There is no need to create any
141any more key pairs - in fact it would be a bad idea to do so.</p>
142<p>When you have done this, move onto <a href="#disabling-password-authentication">Disabling password authentication</a> at the end of this exercise.</p>
143<h1 id="for-laptops-running-linux-or-bsd-or-osx"><a href="#for-laptops-running-linux-or-bsd-or-osx"><span class="header-section-number">3</span> For laptops running Linux (or BSD or OSX)</a></h1>
144<h2 id="generate-an-ssh-publicprivate-key-pair-1"><a href="#generate-an-ssh-publicprivate-key-pair-1"><span class="header-section-number">3.1</span> Generate an ssh public/private key pair</a></h2>
145<pre><code>$ ssh-keygen -t rsa -b 2048
146Generating public/private rsa key pair.
147Enter file in which to save the key (/home/sysadm/.ssh/id_rsa):
148Enter passphrase (empty for no passphrase):
149Enter same passphrase again:
150Your identification has been saved in /home/sysadm/.ssh/id_rsa.
151Your public key has been saved in /home/sysadm/.ssh/id_rsa.pub.
152The key fingerprint is:
15378:77:45:9d:50:27:6d:85:11:63:52:1a:94:ee:22:91 sysadm@hostX.ws.nsrc.org
154The key's randomart image is:
155+--[ RSA 2048]----+
156|           .++@B=|
157|            .*.+=|
158|         . .. .. |
159|       .E   ..   |
160|      . S....    |
161|       ......    |
162|         . .     |
163|                 |
164|                 |
165+-----------------+
166</code></pre>
167<p>The passphrase is used to keep your private key encrypted on disk. It
168 can be pretty much anything you want and as long as you want -
169including spaces - but if you forget it, your key becomes worthless. For
170 now pick something that you will easily remember. You can change it at
171any time you want in the future (using <code>ssh-keygen -p</code>)</p>
172<p>NOTE: Key generation is a one-off exercise. The more you deploy your
173public key, the more work it to be if you were to lose it and have to
174start again with a new one. I suggest you keep a secure backup of it
175somewhere, e.g. on a CD-ROM that you lock away.</p>
176<h2 id="copy-the-public-key-onto-your-unix-server-1"><a href="#copy-the-public-key-onto-your-unix-server-1"><span class="header-section-number">3.2</span> Copy the PUBLIC key onto your Unix server</a></h2>
177<p>Note that <code>.ssh/authorized_keys</code> can contain multiple
178keys, one per line, so to avoid overwriting other user's keys on a
179shared system you should append your key to the authorized_keys file:</p>
180<pre><code>$ cat .ssh/id_rsa.pub | ssh sysadm@hostN.ws.nsrc.org 'cat &gt;&gt;.ssh/authorized_keys'</code></pre>
181<h2 id="login-using-your-private-key-1"><a href="#login-using-your-private-key-1"><span class="header-section-number">3.3</span> Login using your private key</a></h2>
182<p>Open an ssh connection to your server as normal:</p>
183<pre><code>$ ssh sysadm@hostN.ws.nsrc.org</code></pre>
184<p>This time, instead of being prompted for your password, you should be
185 prompted for the passphrase on your private key. Enter it. You should
186be logged in.</p>
187<h2 id="repeat-for-additional-hosts-1"><a href="#repeat-for-additional-hosts-1"><span class="header-section-number">3.4</span> Repeat for additional hosts</a></h2>
188<p>If you have been given multiple hosts to use, now copy your public
189key to each of those other hosts, and check that you can use the same
190private key to log in to each of them. There is no need to create any
191any more key pairs for this exercise.</p>
192<p>When you have done this, move onto <a href="#disabling-password-authentication">Disabling password authentication</a> at the end of this exercise.</p>
193<h1 id="troubleshooting"><a href="#troubleshooting"><span class="header-section-number">4</span> Troubleshooting</a></h1>
194<p>If you cannot log in using your key, it might be that the permissions on your public key or the <code>.ssh</code> directory are too open (sshd will not accept a public key if the file or directory is group-writeable).</p>
195<p>Fix them on the machine you are trying to connect to like this:</p>
196<pre><code>$ chown -R sysadm:sysadm ~/.ssh
197$ chmod 700 ~/.ssh
198$ chmod 600 ~/.ssh/authorized_keys</code></pre>
199<p>If you are using Linux (or BSD or OSX) system, you also need to make sure the permissions are correct on your client computer.</p>
200<pre><code>$ chmod 700 ~/.ssh
201$ chmod 600 ~/.ssh/id_rsa
202$ chmod 600 ~/.ssh/id_rsa.pub</code></pre>
203<h1 id="disabling-password-authentication"><a href="#disabling-password-authentication"><span class="header-section-number">5</span> Disabling password authentication</a></h1>
204<p>Now that you can login to your hosts using private keys, a highly
205recommended step is to disable password authentication completely for
206SSH logins.</p>
207<p>First, let's get a root shell.</p>
208<pre><code>$ sudo -s
209#</code></pre>
210<p>Now you need to edit the file <code>/etc/ssh/sshd_config</code> using whichever text editor you are most comfortable with.</p>
211<pre><code># editor /etc/ssh/sshd_config
212
213--- check this is set ---
214ChallengeResponseAuthentication no
215
216--- find this line ---
217#PasswordAuthentication yes
218--- change it to the following ---
219PasswordAuthentication no</code></pre>
220<p>Exit and save, and then restart ssh:</p>
221<pre><code># service ssh restart</code></pre>
222<p>To test this, try logging in without using your private key, and
223check that it does not fall back to prompting you for a password.</p>
224<p>If your laptop is running Linux or OSX and is still logging in with the key, you may need to run <code>ssh-add -d</code> at the laptop's command line to forget the passphrase.</p>
225<blockquote>
226<p>Question: now you have disabled password authentication, what might you do if you lock yourself out of the machine?</p>
227<p>Answer: you can still login at the machine's <em>console</em> using a password. We have only disabled passwords for SSH logins.</p>
228</blockquote>
229<hr>
230<h1 id="optional-exercises"><a href="#optional-exercises"><span class="header-section-number">6</span> Optional exercises</a></h1>
231<p>(This section is completely optional, but you may like to try it if you have spare time)</p>
232<h2 id="allowing-root-access"><a href="#allowing-root-access"><span class="header-section-number">6.1</span> Allowing root access</a></h2>
233<p>Some environments like to allow direct logins as the "root" user with ssh keys.</p>
234<p>Check that <code>/etc/ssh/sshd_config</code> contains the following line:</p>
235<pre><code>PermitRootLogin without-password</code></pre>
236<p>Now copy your public key to <code>/root/.ssh/authorized_keys</code></p>
237<pre><code># mkdir /root/.ssh
238# cp ~sysadm/.ssh/authorized_keys /root/.ssh/</code></pre>
239<p>Now you should be able to login in another session as username "root"
240 as well as "sysadm", using the same private key. You should immediately
241 get a root prompt without requiring <code>sudo</code>.</p>
242<h2 id="multiple-keys-on-the-same-account"><a href="#multiple-keys-on-the-same-account"><span class="header-section-number">6.2</span> Multiple keys on the same account</a></h2>
243<p>What happens if you want to allow another user to login to the same account? You can just add further public keys to <code>.ssh/authorized_keys</code></p>
244<p>To test this, see if you can allow your neighbour to login to your <code>sysadm</code> account using their public key.</p>
245<p>To do this, you will need to get them to give you their <em>public</em> key, and append it to <code>/home/sysadm/.ssh/authorized_keys</code>. You can do this using whichever method you prefer.</p>
246<p>Note that if you get them to e-mail it to you it may be safer inside a
247 zip file, otherwise e-mail will tend to break the long line into
248shorter lines which would need to be joined together.</p>
249<p>You can then add it either using an editor (again be careful about line wrapping), or using a shell <code>&gt;&gt;</code> (append)</p>
250<pre><code>$ cd
251$ cat &gt;&gt;.ssh/authorized_keys
252    *** PASTE KEY FROM CLIPBOARD ***
253    *** If the cursor is still at the end of the line, hit Enter ***
254    *** hit ctrl-D ***</code></pre>
255<p>After you have done this, check that the expected number of lines (keys) are in the file:</p>
256<pre><code>$ wc -l .ssh/authorized_keys
2572 .ssh/authorized_keys</code></pre>
258<p>Then check that they can login to your machine!</p>
259
260
261</body></html>