1686
Comment: Make part of member manual
|
3875
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
## page was renamed from PasswordlessLogin == How to log in to mire without typing your password == Zeroth, you must have openssh client 4.3 or later. Other versions may work, but we make no guarantees. You will also want the {{{krb5-user}}} package if you are using Debian or Ubuntu. |
#pragma section-numbers off |
Line 5: | Line 3: |
Then, you must obtain kerberos tickets. If your username is "fred", you would do this by typing | This page explains how to log in to our servers without having to type in a password. We use kerberos for this rather than RSA/DSA public keys. The main reason for doing so is [[MemberManual/DistributedSecurity]]; please see that page if you feel that the procedures described below are unduly cumbersome. An extra benefit is that passwordless logins using kerberos are noticably faster than passwordless logins using public key authentication. This is because kerberos uses symmetric cryptography (which is faster) and requires fewer round-trips during the authentication process. These instructions have been tested with the major unix variants (Debian, RedHat, Fedora, Ubuntu, MacOSX, etc). There are reports that the ssh client in certain minor distributions (ArchLinux, for one) does not support this. <<TableOfContents>> = Prerequisites = You must have openssh client 4.3 or later. Other versions may work, but we make no guarantees. You will also want the {{{krb5-user}}} package if you are using Debian or Ubuntu. For Mac OS X 10.5 and later no additional software is required for the instructions below to work; earlier versions of Mac OS X might work if you install the MacPorts version of kerberos+ssh (but no guarantees!). For further details, check out [[MemberManual/TransferringFiles/OpenAFS]], and follow just the Kerberos instructions. = Instructions = Once a Kerberos client hsa been installed, you must obtain Kerberos tickets. If your username is "fred", you would do this by typing: |
Line 8: | Line 20: |
kinit fred@HCOOP.NET | kinit -f fred@HCOOP.NET |
Line 10: | Line 22: |
Then type your password when prompted. Note that you MUST capitalize HCOOP.NET and you MUST NOT capitalize your user name. This is important. | Then type your password when prompted. Note that you '''must''' capitalize HCOOP.NET and you '''must not''' capitalize your user name. This is important. |
Line 15: | Line 28: |
klist | klist |
Line 17: | Line 30: |
Line 22: | Line 36: |
ssh -o 'GSSAPIAuthentication yes' -o 'GSSAPIDelegateCredentials yes' fred@mire.hcoop.net | ssh -oGSSAPIAuthentication=yes -oGSSAPIDelegateCredentials=yes fred@mire.hcoop.net |
Line 24: | Line 38: |
(GSSAPI is sort of like Kerberos. Don't worry about the difference at this point.) | |
Line 26: | Line 39: |
If that doesn't work, add "`-vvv`" to the command line and copy and paste the ENTIRE output into an email to hcoop-discuss and we'll tell you what's up. | {{{GSSAPI}}} is the "generic name" for Kerberos-like authentication protocols. The first option tells your ssh client to use your Kerberos tickets to prove your identity to the hcoop servers. The second option tells your ssh client that it is safe to entrust the hcoop servers with a copy of your tickets once you have authenticated. |
Line 28: | Line 41: |
If you do this a lot, you can include the `GSSAPIAuthentication` and `GSSAPIDelegateCredentials` options in your `.ssh/config` file. But you should NOT turn on `GSSAPIDelegateCredentials` for arbitrary hosts (make sure you only enable it for HCOOP hosts). Here's what AdamMegacz uses: | = Automating things = If you do this a lot, you can include the `GSSAPIAuthentication` and `GSSAPIDelegateCredentials` options in your `~/.ssh/config` file. But you should NOT turn on `GSSAPIDelegateCredentials` for arbitrary hosts. Make sure you only enable it for HCOOP hosts! You should never, ever use {{{GSSAPIDelegateCredentials}}} on a machine which is operated by somebody other than yourself and HCoop. Here is an example entry for `~/.ssh/config`: |
Line 31: | Line 50: |
Host deleuze.hcoop.net ForwardX11Trusted yes |
Host hcoop HostName mire.hcoop.net |
Line 35: | Line 54: |
User megacz_admin Host mire.hcoop.net ForwardX11Trusted yes GSSAPIAuthentication yes GSSAPIDelegateCredentials yes User megacz_admin |
User fred |
Line 42: | Line 56: |
== If it doesn't work == See TroubleshootingKerberos |
This will allow you to type the following, instead of the longer command above. {{{ ssh hcoop }}} = Troubleshooting = Adding "-vvv" to the ssh command line makes it spit out lots of useful debugging information. If you see something like the following in the output: {{{ debug1: Unspecified GSS failure. Minor code may provide more information Server not found in Kerberos database }}} check to see if you have an /etc/hosts file with the host that you're trying to reach in it. If there is an entry for this host, make sure that the fully-qualified domain name is listed first, before any aliases that you may be using. == If it still doesn't work == See the [[MemberManual/ShellAccess/TroubleshootingKerberos|Troubleshooting Kerberos]] page for more diagnostics. You may also send the output of your ssh command with the "'-vvv'" to hcoop-help and we'll try to figure things out from there. |
This page explains how to log in to our servers without having to type in a password. We use kerberos for this rather than RSA/DSA public keys. The main reason for doing so is MemberManual/DistributedSecurity; please see that page if you feel that the procedures described below are unduly cumbersome.
An extra benefit is that passwordless logins using kerberos are noticably faster than passwordless logins using public key authentication. This is because kerberos uses symmetric cryptography (which is faster) and requires fewer round-trips during the authentication process.
These instructions have been tested with the major unix variants (Debian, RedHat, Fedora, Ubuntu, MacOSX, etc). There are reports that the ssh client in certain minor distributions (ArchLinux, for one) does not support this.
Prerequisites
You must have openssh client 4.3 or later. Other versions may work, but we make no guarantees. You will also want the krb5-user package if you are using Debian or Ubuntu. For Mac OS X 10.5 and later no additional software is required for the instructions below to work; earlier versions of Mac OS X might work if you install the MacPorts version of kerberos+ssh (but no guarantees!). For further details, check out MemberManual/TransferringFiles/OpenAFS, and follow just the Kerberos instructions.
Instructions
Once a Kerberos client hsa been installed, you must obtain Kerberos tickets. If your username is "fred", you would do this by typing:
kinit -f fred@HCOOP.NET
Then type your password when prompted. Note that you must capitalize HCOOP.NET and you must not capitalize your user name. This is important.
Next, make sure you have your tickets. To do this, type
klist
You should see your tickets and their expiration dates.
Last, type
ssh -oGSSAPIAuthentication=yes -oGSSAPIDelegateCredentials=yes fred@mire.hcoop.net
GSSAPI is the "generic name" for Kerberos-like authentication protocols. The first option tells your ssh client to use your Kerberos tickets to prove your identity to the hcoop servers. The second option tells your ssh client that it is safe to entrust the hcoop servers with a copy of your tickets once you have authenticated.
Automating things
If you do this a lot, you can include the GSSAPIAuthentication and GSSAPIDelegateCredentials options in your ~/.ssh/config file. But you should NOT turn on GSSAPIDelegateCredentials for arbitrary hosts. Make sure you only enable it for HCOOP hosts! You should never, ever use GSSAPIDelegateCredentials on a machine which is operated by somebody other than yourself and HCoop.
Here is an example entry for ~/.ssh/config:
Host hcoop HostName mire.hcoop.net GSSAPIAuthentication yes GSSAPIDelegateCredentials yes User fred
This will allow you to type the following, instead of the longer command above.
ssh hcoop
Troubleshooting
Adding "-vvv" to the ssh command line makes it spit out lots of useful debugging information.
If you see something like the following in the output:
debug1: Unspecified GSS failure. Minor code may provide more information Server not found in Kerberos database
check to see if you have an /etc/hosts file with the host that you're trying to reach in it. If there is an entry for this host, make sure that the fully-qualified domain name is listed first, before any aliases that you may be using.
If it still doesn't work
See the Troubleshooting Kerberos page for more diagnostics. You may also send the output of your ssh command with the "'-vvv'" to hcoop-help and we'll try to figure things out from there.