![]() ![]() Once this is done, then you have to create a PuTTY session where the private key is used. If this is the first time you have created the ~/.ssh/authorized_keys file, make sure the directory and file are not group or world readable. The second is the key which should end with the characters "=" the third field is optional, and will contain what you put in the Key Comment field. There should be three fields on a single line. Log into the remote machine, and copy/edit, then append the public key into the ~/.ssh/authorized_keys file in the same format as the other keys. When I copied this file over to Windows, the system insisted on splitting the single long line into multiple lines with "\" between the lines. I'd use the 'J' command to join two lines, then search for spaces and delete the spaces between the lines. Personally, I would copy the file over to the Linux machine, and then edit it, because editors like vim are much more tolerant of long lines. Ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAgEA5Kp+G9z8eE0MpPZL9JZksstIa3L9JEND6ud11IiD6f1jw/7Lv7CvZcCdkOVMT+DlTbryRoqfbNMLkjajqNTUGBAscTduUtPYuQtYEQgtbJdhyHtTHK9XwiKeQr7LjHZcEg3osYh+MzZFscldQMaZ26AKh81EC9XuIu98snjOBM0ysb14Uu7hMvti5Xd3kSW7ctL2j1ORuRgZX6LHihaezvsBFI5SlZ4vyxymRKQnyV6OkMNMXESJpXh3cTMIIGtDJtbbYvh5Qs0f3O1fMiQYyz2MjGphdzBihq85a1SHx0LBk31342HsCiM4elZkicmjmy0qYGShmzh1kfZBKiBs+xN4tBEyjRNYhuMGP2zgpr9PFO1buYdLah5ab3rubB5VbbRP9qmaP2cesJSN91luc099gZ+CgeBVIiRr1EYTE8TqsSBdvmu3zCuQgDVcSAoubfxjM4sm3Lb6i4k4DJmF57J6TrcyrSIP9HPDuBuYoOfSBKies6bJTHi9zW2upHqNlqa2+PNY64hbq2uSQoKZl1SxwSCvpbsYj5bGPQUGs+6AHkm9DALrXD8TXivQ+IsWEV3wnXeA4I1xfnodfXdhwnybcAlqNrEwKb3wGWdf3d8cu+mJrJiP1JitBbd4dzYM0bS42UVfexWwQSegDHawAby0MW0= rsa-key-20160822 The third is a comment - which can correspond to your key comment field.The second should be your public key all on one line with no spaces. ![]() Let's assume it's a Linux machine using ssh. You have to edit this to a form that is suitable for your remote site. YbcAlqNrE/wKb3/wGWdf3d8cu+mJrJiP1JitBbd4dzYM0bS42UVfexWwQSegDHaw XwSCvpbsYj5bGPQUGs+6AHkm9DALrXD8TX/ivQ+IsWEV3wnXeA4I1xfnodfXdhwn RcyrSIP9H/PDuBuYoOfSBKies6bJTHi9zW2/upHqNlqa2+PNY64hbq2uSQoKZl1S Z+CgeBVIiRr1EYTE8TqsSBdvmu3zCuQgDVcSAoubfxjM4sm3Lb6i4k4DJmF57J6T YjRNYhuMGP2zgpr9P/FO1buYdLah5ab3rubB5VbbRP9qmaP2cesJS/N91luc099g ZBihq85a1SHx0LBk31342HsCiM4el//Zkicmjmy0qYGShmzh1kfZBKiBs+xN4tBE ![]() UIu98snjOBM0ysb14Uu7hMvti5Xd3kSW7ctL2j1ORuRgZX6LHihaezvsBFI5S/lZĤv/yxymRKQnyV6OkMNMXESJpXh3cTMIIGtDJtbbYvh5Qs0f3O1fMiQYyz2MjGphd YEQgtbJd/hyHtTHK9X/wiKeQr7LjHZcEg3osYh+MzZFscldQM/a/Z26AKh81EC9X Your public key will look like this: - BEGIN SSH2 PUBLIC KEY -ĪAAAB3NzaC1yc2EAAAABJQAAAgEA5Kp+G9z8eE0MpPZL9JZksstIa3L9JEND6ud1ġIiD6f1jw/7Lv7CvZcCdk/OVMT+DlTbryRoqfbNMLkjajqNTUGBAscTduUtPYuQt Then save the private key in one file, and the public key in another file. Once it's generated, your screen will look like this:ĭescribe the account in the "Key Comment" field. I'd use at least 4098 bits.Ĭlick the Generate button, move the mouse around, until the key pair is generated. Here is how you do this.ĭownload PuTTYgen, and execute it to generate a SSH2-RSA key. You should first use PuTTYgen to create a key pair, then install the private key in PuTTY, and copy the public key to the remote site. This is the PuTTY-only way to do it, only using software from the PuTTY site. nf on the web for many good customizations to get you started.Combining two different packages for a security solution can be dangerous. So my recommendation would be tmux.Īlso search for "dotfiles", in particular nf and. apt-get install tmuxīyobu is a nice frontend to both terminal multiplexers, but tmux is so comfortable that in my opinion it obsoletes byobu to a large extent. Now you get "tabs" in the form of windows and panes inside GNU screen and tmux. And not to forget, terminal multiplexers overcome one of the big disadvantages of PuTTY: no tabbed interface. ![]() The possibilities are manifold and it's a true productivity booster. So you can connect to the same session from another machine (e.g. And that works across different machines. This way even if you get forcibly disconnected - let's face it, a power outage or network interruption can always happen - you can always resume your work where you left. Set up byobu (or even just tmux alone as it's superior to GNU screen) and always log in and attach to a preexisting session (that's GNU screen and tmux terminology). In addition I would strongly recommend that you do something else entirely. Bash (usually the default shell on Ubuntu) has a value TMOUT which governs (decimal value in seconds) after which time an idle shell session will time out and the user will be logged out, leading to a disconnect in an SSH session. In addition to the answer from "das Keks" there is at least one other aspect that can affect this behavior. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |