Maintenance

  • Home
  • Log in
  • « Ubuntu repo news
  • Python simple server for testing complex sites »

SSHKey tricks (password-less remote login with keys)

Posted by gregster on 24 Feb 2020 in Servers

It's really 1 command - 2 if you don't already have a key.
If you *don't* have a key already, create one with:
ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ""
This (quietly -q) creates an RSA-2048 key in the usual place with NO passphrase on the key (-N "" provides an empty string for the new passphrase).

Once you have a key, you only need to run a command like this to push it to a remote machine:
cat ~/.ssh/id_rsa.pub | ssh ${REMOTE_USER}@${REMOTE_HOST}
where ${REMOTE_USER} is your login name and ${REMOTE_HOST} is a machine name or IP address of the remote machine (like myserver.uvic.ca).

I wrote a slightly more interactive script that does this for you. It's in the Utils repo as well, but I've attached a snapshot version to this post.

Attachments:

  • upyerssh.zip (3.7 KB)

Attachments:

  • upyerssh.zip (3.7 KB)
This entry was posted by Greg and filed under Servers.

Maintenance

This blog is the location for all work involving software and hardware maintenance, updates, installs, etc., both routine and urgent.
  • Home
  • Recently
  • Archives
  • Categories

Search

Categories

  • All
  • Announcements
  • Hit by a bus
  • Labs
    • Activity log
    • Documentation
  • Notes
  • R & D
    • Activity log
    • Documentation
  • Servers
    • Activity log
    • Documentation
  • Tasks

All blogs

  • Academic
  • AdaptiveDB
  • Admin
  • Announcements
  • CanMys
  • Cascade
  • CGWP
  • ColDesp
  • Depts
  • DVPP
  • Endings
  • HCMC Blogs
  • Landscapes
  • LEMDO
  • Linguistics
  • Maint
  • LondonMap
  • Mariage
  • MoM
  • Moses
  • Pro-D
  • Projects
  • ScanCan
  • HumsSites
  • Wendat

This collection ©2022 by admin • Help • Community CMS