SSH ve login ile bir programi tetiklemek: Nasil?
Merhaba,
Asagidaki islevi en sade ve acisiz sekilde gerceklestirmek icin
önerileri bekliyorum:
- Makinaya sadece ve sadece SSH üzerinden *basarili* sekilde login
olundugunda WXYZ programi calissin.
Yani ben makina basinda fiziksel olarak bulunup basarili login
gerceklestiginde WXYZ tetiklenmeyecek, sadece
bu SSH üzerinden oldugunda program tetiklenecek.
Bunun icin halihazirda bir altyapi var midir yoksa akliniza gelen
öneriler "bir servis yaz arkada calissin, her su kadar
milisaniyede bir filanca log dosyasini kontrol edip is yapsin" seklinde
midir?
sshd man sayfasinda
$HOME/.ssh/rc
If this file exists, it is run with /bin/sh after reading
the environment files but before starting the user's shell or command.
It must not
produce any output on stdout; stderr must be used instead.
If X11 forwarding is in use, it will receive the "proto cookie" pair in
its stan-
dard input (and DISPLAY in its environment). The script
must call xauth(1) because sshd will not run xauth automatically to add
X11 cookies.
The primary purpose of this file is to run any
initialization routines which may be needed before the user's home
directory becomes accessi-
ble; AFS is a particular example of such an environment.
gibi bir bölüm buldum ancak bu da $HOME lafinin cagristirdigi dogrultuda
belli bir kullanici dizininde bir dosya
oldugunu var sayiyor, yani sisteme basarili giris yapabilecek tüm
kullanicilarin "home" dizinlerinde bu dosyanin
olma mecburiyeti var gibi algiladim.
Bunlarin haricinde olasi bir cözüm alternatifi var midir acep?
--
Emre Sevinç
eMBA Yazılım Geliştirme
İstanbul Bilgi Üniversitesi
Reply to: