root-Login von spezifischem Host?
root-Login von spezifischem Host?
Mahlzeit!
Ich habe mir für private Zwecke von einem Bekannten ein kleines FreeBSD-Jail auf einem seiner Server abgezwackt. Nun möchte ich das gerne von ihm backuppen lassen - dazu benötigt er bei seinem Backup-System aber root-Zugriff auf mein Jail, damit sein Backupskript auf meinen Kram zugreifen kann.
Ich möchte aber seeeehr ungerne global root-Login erlauben. Gibt es also bei OpenSSH von Haus aus eine Möglichkeit, root-Login nur für eine spezifische Client-IP zu erlauben?
Das Wälzen der Dokumentation hat mich da nicht wirklich weitergebracht und bevor ich mit sowas anfange wie zwei Instanzen mit unterschiedlichen Konfigurationen oder irgendeine (mir eher unangenehme) Lösung mit xinetd zu basteln, wollte ich nur kurz nachfragen, ob jemand nicht noch einen Denkansatz hat, wie man das elegant lösen kann.
Gruß, Nico
Ich habe mir für private Zwecke von einem Bekannten ein kleines FreeBSD-Jail auf einem seiner Server abgezwackt. Nun möchte ich das gerne von ihm backuppen lassen - dazu benötigt er bei seinem Backup-System aber root-Zugriff auf mein Jail, damit sein Backupskript auf meinen Kram zugreifen kann.
Ich möchte aber seeeehr ungerne global root-Login erlauben. Gibt es also bei OpenSSH von Haus aus eine Möglichkeit, root-Login nur für eine spezifische Client-IP zu erlauben?
Das Wälzen der Dokumentation hat mich da nicht wirklich weitergebracht und bevor ich mit sowas anfange wie zwei Instanzen mit unterschiedlichen Konfigurationen oder irgendeine (mir eher unangenehme) Lösung mit xinetd zu basteln, wollte ich nur kurz nachfragen, ob jemand nicht noch einen Denkansatz hat, wie man das elegant lösen kann.
Gruß, Nico
Re: root-Login von spezifischem Host?
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Re: root-Login von spezifischem Host?
Huch, diese Syntax für AllowUsers war mir nicht bekannt und ich hab sie offenbar übersehen. Danke, super!
Re: root-Login von spezifischem Host?
Deswegen macht es auch keinen Sinn mehr, OpenSSH gegen TCPWrapper zu linken.
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Re: root-Login von spezifischem Host?
Mal ne blöde Frage - wenn Dein Bekannter root auf dem Server ist, wieso benötigt er dann einen root-Zugang per SSH zum Jail? Er könnte doch einfach jexec nutzen...
“Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying 'End-of-the-World Switch. PLEASE DO NOT TOUCH', the paint wouldn't even have time to dry.” — Terry Pratchett, Thief of Time
Re: root-Login von spezifischem Host?
Ähm, er hat doch ohnehin vollen Zugriff auf das Dateisystem, wozu also dann noch root-Rechte im Jail?
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Re: root-Login von spezifischem Host?
Weil man von außen keine File-Handles auf Dateien innerhalb eines Jails öffnen möchte... (siehe http://www.bsdforen.de/showthread.php?t=22123)
“Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying 'End-of-the-World Switch. PLEASE DO NOT TOUCH', the paint wouldn't even have time to dry.” — Terry Pratchett, Thief of Time
Re: root-Login von spezifischem Host?
Meines Wissens fährt er eine backupserver-seitige Pull-Strategie, sprich, seine Backupserver ziehen sich via rsync über SSH die Backups von seinen verschiedenen Kisten zusammen. Da kommt er als unprivilegierter Systemuser nicht sehr weit...
Re: root-Login von spezifischem Host?
Wenn ein SSHd im "Haupt"-System läuft, kommt er per root-Login dort ja problemlos an alle Daten Deines Jails heran. Wenn er dort "pullt", ist er unabhängig davon, was seine "Gäste" an der Konfiguration verbiegen. Nur deswegen hat mich das etwas gewundert... Natürlich muss man dabei auf File Handles achtgeben, aber dafür setzt man dann i.d.R. einfach nullfs-Mounts ein. Doch das wird hier langsam ein bisschen OT ;-)EdRoxter wrote:Meines Wissens fährt er eine backupserver-seitige Pull-Strategie, sprich, seine Backupserver ziehen sich via rsync über SSH die Backups von seinen verschiedenen Kisten zusammen. Da kommt er als unprivilegierter Systemuser nicht sehr weit...
Last edited by daemotron on 2010-05-15 18:42, edited 1 time in total.
“Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying 'End-of-the-World Switch. PLEASE DO NOT TOUCH', the paint wouldn't even have time to dry.” — Terry Pratchett, Thief of Time
Re: root-Login von spezifischem Host?
Ich hab keine Ahnung, was er mit dem Hostsystem genau anstellt - das Jail ist nur eine Art kleine Spielwiese/Testsystem für einen Freund und mich ohne allzu sensible Daten, bei denen es aber zumindest nervig wäre, wenn sie verloren gingen. Nichtsdestotrotz wär's natürlich schon allein aus Prinzip eher ungut, wenn ich dem ganzen Internet quasi schonmal zeige, wo sich das Schloss am Tor befindet - daher meine Frage nach Adress(raum)beschränkung fürs Root-Login. ;)
Re: root-Login von spezifischem Host?
Und die Warnung im Handbuch nicht vergessen ;)
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Re: root-Login von spezifischem Host?
Also solange man eh nur Anmeldung per Key erlaubt, tut das gar nicht weh.EdRoxter wrote:Ich möchte aber seeeehr ungerne global root-Login erlauben. Gibt es also bei OpenSSH von Haus aus eine Möglichkeit, root-Login nur für eine spezifische Client-IP zu erlauben?
Re: root-Login von spezifischem Host?
Problem dabei: Login via password/PAM muss für einige unprivilegierte User möglich sein.
Ich hab's jetzt mal mit
probiert und schau, ob der Backup-Server via pubkey-auth trotzdem noch reinkommt.
Müsste meinem logischen Verständnis nach so funktionieren, oder?
Ich hab's jetzt mal mit
Code: Select all
PermitRootLogin without-passwordMüsste meinem logischen Verständnis nach so funktionieren, oder?
Re: root-Login von spezifischem Host?
Funktioniert, aber PAM will man bei OpenSSH nicht, siehe Kommentar in der Original-Config ;)
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Re: root-Login von spezifischem Host?
Arg, stimmt, da war was. Brauch ich sowieso nicht, password reicht vollkommen für die User. Danke für den Hinweis, ist aus. :)

