LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-25-2015, 06:34 AM   #1
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Rep: Reputation: 51
Kerberos/k5start ticket/credentials issue SSH


Hi all,

BACKGROUND: (Just skip to issue
===========
I would like to do the following:
There is a server on which I have git repositories.
I would like to connect via ssh to this server and keep my local repositories up to date.
I have a script and then the only thing I needed was a way to be able to keep logging in to the remote server. The server does not support public/private keys, but does allow use of the GSSAPI

ISSUE:
======
I use k5start to get a ticket for user@server.com using a local keytab file:
k5start user@server.com -f keytab
This allows me to connect to gate.server.com using ssh
ssh user@gate.server.com

However, I get permission denied on the files on the server.
This is strange because I am allowed to log in.

It becomes even stranger...
When I connect using ssh from the same system and I supply a password, I no longer have any problems with permission denied.
It only seems to matter if I logged in to the remote server and not via which user/computer/ip. The extra permission seems to be granted with some lifetime, but for the purpose of having the remote connection I would also like to renew those permissions.

So to me it seems that using k5start I do not get all the permissions that I need and some of these permissions seem to be granted only when I log in using a password.

Has anyone got a clue as to what permissions I could be lacking?
And how I could keep those permissions alive?

Best,
Hugo
 
Old 12-25-2015, 07:54 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
There are a couple of possibilities I can think of:

The directory on the server requires forwardable tickets..(possible AFS access limitations?)

the user on the server might not be the same as specified in the service ticket... I'm not sure how the mismatch may be handled with current distributions (it used to be in a .k5login to identify permitted connections, and the entry may not permit some access.. (you might check to see what an "id" command provides on the server in that case).

But it depends on the krb5_conf specifications as to what is different - specially for the forwardable tickets, as k5start takes the default which may not have the forwardable ticket flag enabled.

Note: Though I used to be a kerberos admin, it has been a number of years since, so some things may have changed.

Last edited by jpollard; 12-25-2015 at 07:57 AM.
 
1 members found this post helpful.
Old 12-26-2015, 04:27 AM   #3
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Original Poster
Rep: Reputation: 51
Thanks a lot, this helped me recover the true problem, which is a missing afs token.

I checked that ticket forwarding is allowed, but I do not have AFS on my CentOS7 computer.

I guess the solution should be to use the kerberos ticket to obtain an AFS token on the server.
Or to at least keep an existing AFS token alive.

Any hints as to how to do this?
 
Old 12-26-2015, 05:23 AM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
I don't know if this will help, but since you do have an AFS environment:

http://kb.mit.edu/confluence/pages/v...pageId=4981395

There they direct that the ssh command use the -K option on ssh to forward tickets as forwarding may not be the default.

It may also be that you need to get an AFS ticket before the ssh (not sure, I would think obtaining an AFS ticket would be automatic on the server, and that depends on having a forwarded ticket)
 
1 members found this post helpful.
Old 12-26-2015, 05:50 AM   #5
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Original Poster
Rep: Reputation: 51
I had already tried

Host gate1.server.com
GSSAPIDelegateCredentials yes

And I also tried the -K command, but I still get the same problem.
I also think this is because I lack an AFS token/ticket.
It should be possible to get a ticket with aklog.

However, On my CentOS computer I don't have AFS installed and I don't see any easy way (i.e. via repos) to do so.
Perhaps, I should just ask the admin of the server what they suggest.
 
Old 12-26-2015, 06:06 AM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
The aklog would have to be run on the server.

OpenAFS has a repository for CentOS. reference:http://wiki.openafs.org/InstallingOpenAFSonRHEL/
though this was for CentOS 6.

It certainly wouldn't hurt to ask - they may have a quick solution.
 
Old 01-08-2016, 03:28 PM   #7
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Original Poster
Rep: Reputation: 51
The admins suggested I add the following lines to my .ssh/config for the specific host I try to connect to:

GSSAPIAuthentication yes
GSSAPIDelegateCredentials yes
GSSAPITrustDns yes

This seems to work.

Thanks for the help.
 
  


Reply

Tags
kerberos, ssh access



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kerberos credentials aren't forwarded after SSH 0ddba11 Linux - Software 4 02-18-2010 09:09 AM
Problem for get ticket from kerberos aspenbr Linux - Networking 1 08-11-2009 10:44 AM
Problem in get ticket with Kerberos aspenbr Linux - Software 0 08-11-2009 04:24 AM
LXer: LDAP replication with Kerberos auth and k5start LXer Syndicated Linux News 0 01-25-2007 02:33 AM
Samba Kerberos Ticket sindri Linux - Software 0 11-24-2004 01:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration