Results 1 to 3 of 3

Thread: Copying SSH Keys to Server

  1. #1
    Join Date
    Apr 2010
    Location
    Seattle, WA, USA
    Beans
    Hidden!
    Distro
    Ubuntu

    Copying SSH Keys to Server

    I'm trying to connect to my Ubuntu Server via SSH with key-based authentication from Mac OS X. Unfortunately, you can't run the ssh-copy-id command on a Mac -- it just won't work. Instead, should I just copy the file id_rsa.pub from my Mac and put it on the server manually? Does it go in ~/.ssh/authorized_keys and should the file have the same name (id_rsa.pub)? It looks like my user account on the server doesn't have a folder called .ssh in the home directory (at least I can't cd to it), should I just create it or am I missing some critical process that does that for me?
    Linux User: #517609
    Ubuntu User: #32468

  2. #2
    Join Date
    Jul 2010
    Location
    Warsaw, Poland
    Beans
    38
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Copying SSH Keys to Server

    Yes, Yes.... (commands in CODE shoud be done on server.

    ssh to server
    Code:
    mkdir .ssh
    logout
    Code:
    scp -C id_rsa.pub user@server:~/.ssh/authorized_keys
    ssh to server
    Code:
    chmod g-rwx,o-rwx .ssh -R
    logout
    ssh to server (shoud be without asking password).

    Adam
    Ubuntu servers administration, Harbour programmer.
    Service for bussiness applications - ABIX - Poland.

  3. #3
    Join Date
    Apr 2010
    Location
    Seattle, WA, USA
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Copying SSH Keys to Server

    Thank you, that worked like a charm!
    Linux User: #517609
    Ubuntu User: #32468

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •