Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

two questions about SSH

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
nahpets
Veteran
Veteran
User avatar
Posts: 1178
Joined: Sun Oct 05, 2003 11:18 pm
Location: Montreal, Canada

two questions about SSH

  • Quote

Post by nahpets » Thu Mar 10, 2005 6:38 pm

First Question
I have 3 linux machines at 3 physical locations and I want to be able to use public/private key authentication so that any one machine can log into any of the others without needing a password. Should I create a single private/public key pair and copy the private key over to each machine, or is it better to make one key pair per machine?

Second Question
I want to be able to use key authentication to log into a Solaris machine from a Linux machine. Does anyone know how to get this working? I was told by my sysadmin that the format for the keys is different and that I need to convert them somehow. I did some googling and I can't seem to find what I need.
Top
j0hn
n00b
n00b
Posts: 6
Joined: Sun Sep 12, 2004 10:02 am
Location: Sweden

  • Quote

Post by j0hn » Thu Mar 10, 2005 7:12 pm

First Q:

I'd go with different keys and use ssh-agent.

Second Q:

The Solaris box probably uses keys in the `SECSH Public Key File Format'. You can convert openssh-keys to that format using ssh-keygen with the -e option.
Top
Xamindar
Veteran
Veteran
User avatar
Posts: 1155
Joined: Sun Oct 03, 2004 2:52 am
Location: California
Contact:
Contact Xamindar
Website

  • Quote

Post by Xamindar » Thu Mar 10, 2005 7:39 pm

Can I add a question?

How can I have my ssh session stay open when I disconnect? For example, so I can execute an emerge command and then disconnect while it completes. And then connect some time later to the same sessoon to check on its progress or cancel it?
Top
WarMachine
Apprentice
Apprentice
Posts: 181
Joined: Mon Jul 15, 2002 7:57 pm

  • Quote

Post by WarMachine » Thu Mar 10, 2005 7:45 pm

Xamindar wrote:Can I add a question?

How can I have my ssh session stay open when I disconnect? For example, so I can execute an emerge command and then disconnect while it completes. And then connect some time later to the same sessoon to check on its progress or cancel it?
emerge screen

as soon as you log in type screen

after you disconnect and reconnect: screen -r
Top
phildrip
n00b
n00b
Posts: 23
Joined: Mon Jul 14, 2003 10:03 am

  • Quote

Post by phildrip » Thu Mar 10, 2005 8:17 pm

I have 3 linux machines at 3 physical locations and I want to be able to use public/private key authentication so that any one machine can log into any of the others without needing a password. Should I create a single private/public key pair and copy the private key over to each machine, or is it better to make one key pair per machine?
I find the easiest way to do this is to generate a key pair on each machine, and then cat each others' public keys into the ~/.ssh/authorized_keys file:

Code: Select all

ssh-keygen -t dsa
to generate a keypair. You need to use a blank keyphrase for passwordless logins. Next you need to copy each machine's pubilc key id_dsa.pub onto each of the other machines; ie machine A has the public key for both B and C, B has A and C's and C has B and A's. Add the contents of each of the public keys into the authorized_keys file:

Code: Select all

cat id_dsa.pub >> ~/.ssh/authorized_keys
and then

Code: Select all

chmod 600 ~/.ssh/authorized_keys
on each machine.
Top
nahpets
Veteran
Veteran
User avatar
Posts: 1178
Joined: Sun Oct 05, 2003 11:18 pm
Location: Montreal, Canada

  • Quote

Post by nahpets » Thu Mar 10, 2005 8:47 pm

Thanks all for the advice.
j0hn wrote:First Q:

I'd go with different keys and use ssh-agent.
I've never needed to use ssh-agent. Can you tell me why I should use it? If I copy the keys to each machine, and cat all 3 public keys to .ssh/authorized_keys, what do I need ssh-agent for?
Top
j0hn
n00b
n00b
Posts: 6
Joined: Sun Sep 12, 2004 10:02 am
Location: Sweden

  • Quote

Post by j0hn » Thu Mar 10, 2005 9:23 pm

nahpets wrote: I've never needed to use ssh-agent. Can you tell me why I should use it? If I copy the keys to each machine, and cat all 3 public keys to .ssh/authorized_keys, what do I need ssh-agent for?
Do you supply an empty passphrase when you create your keys? In that case you don't need ssh-agent. If you want to protect your keys with a passphrase but don't want to type in that passphrase everytime you use your key you can use ssh-agent.
Top
Post Reply

7 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic