Posts Tagged ‘ssh’

12
Jun

proxy üzerinde uzak dns

   Posted by: İsmail ÇAKIR    in Bilgi Ve Deneyim

Putty ile ssh tünelleme yazısını okuyan bazı arkadaşlar yine de ateş duvarına yakalandıklarını belirtmişler. (O yazıyı okumadan bunu okumayın tabi). Bunun iki nedeni olabilir.

Birincisi istemelerinizden yakalanmışınızdır. Bu sorunu ile aşmak çok kolay.

Firefox adres çubuğuna “about:” yazın. Gelen uyarı sayfasında “i’ll be careful, i promise” (söz veriyom dikkat ediceğim) yazan butonu clickleyin. Açılıcak olan konfigurasyon ayarları kısmının en üstündeki filtreye “” yazın.
network..socks_remote_dns yazan anahtarın sonundaki “false” ibaresini çift tıklayıp “true” yapın. Bu noktadan itibaren
alan adı istemleriniz sizin ya da modeminizin değil, ayarladığınız socks vekil sunucu üzerinden şifreli gidicektir.

İkinci durum biraz daha komplekstir. ateş duvarınız mitm yapıcak şekilde ayarlanmıştır. Üzerinden geçen trafiği dinlemeye çalışmaktadır. Bu durumu ile daha önce girmediğiniz iki siteye bağlanmaya çalışıp gelen uyarıda ki fingerprintleri karşılaştırarak hemen farkına varabilirsiniz. Eğer ikisi de aynı fingerprinti gösteriyorsa, güvenli trafiğiniz muhtemelen dinleniyordur. (Tabi iki sitenin aynı sunucuda barınması ihtimali yoksa). Ateş duvarı trafiği dinlemek için karşı sunucu yerine kendi imzasını koyar bu da farkli sunucularda aynı imzayı görmenize neden olur. Bu durumda ne yapmanız gerektiğini başka bir yazıda anlatıcağım. Aşağıda konuyla ilgili resimler var.

Bookmark and Share
Tags: , , , , , , , , ,

Tags: , , , , , , , , ,

25
Mar

boş bekleyen ssh bağlantılarının otomatik kesilmesini önleme

   Posted by: Muhammed YÜRÜRDURMAZ    in Linux

üzerinde açık olan bir bağlantınızı bir süre kullanmadığınızda

, server not responding.

şeklinde bir mesaj alıp bağlantınız kesiliyorsa

~/.ssh/

dosyası içerisine

 30
 0

yazarsanız 30 saniyede bir boş paket göndererek bağlantınızın açık kalmasını sağlar

Bookmark and Share
Tags: , , , , ,

Tags: , , , , ,

1
Mar

Facebook yasaklandı mı?

   Posted by: İsmail ÇAKIR    in Bilgi Ve Deneyim

Bu sabah facebook.com yadığımda açılmadı,
wiki answersdan ip adreslerini alıp denedim;
69.63.184.142
69.63.187.17
69.63.187.19
69.63.181.11
69.63.181.12

traceroute larım sebepsiz nedensiz döndü,

20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *

cevap yok?

amerikada ki hostinglerden birine ile tunnelleyip çıktım ve facebook orda duruyor.

tüm türkiyeden bir tane online arkadaşım yok.

yasak sayfası yok. bu telekomdan ya da odtüden birinin as makinenin başına geçip iyi routing yaparım diyerek routing tablosunu uçurmasından mı merak ediyorum.

Bookmark and Share
Tags: , , , , , , ,

Tags: , , , , , , ,

18
Feb

Putty ile SSH tünelleme

   Posted by: İsmail ÇAKIR    in Bilgi Ve Deneyim

Bağlantınızın dinlendiğini düşünüyorsanız ya da çalıştığınız işyerinin, kampüsün firewall kuralları istediğiniz yere girmenize izin vermiyor fakat uzaktaki makinanıza ile bağlanabiliyorsanız. ile hızlı bir şekilde üzerinden şifreli bir şekilde çıkabilirsiniz.

öncelikle putty > connection > ssh tabına dinamik olarak bir dinleme portu ayarlayıp add e tıklıyoruz. Resimde 6666 portu için ayarlı gözüküyor.

daha sonra browserımızı açıp ayarlarına bu bilgiyi giriyoruz.
Aşağıda için ayarlı hali gözüküyor.

daha sonra ipadresim‘den yeni aldığınız ip’yi kontrol edebilirsiniz.

Bookmark and Share
Tags: , , , , ,

Tags: , , , , ,

5
Feb

ssh bağlantısında Host key verification failed hatası

   Posted by: Muhammed YÜRÜRDURMAZ    in Bilgi Ve Deneyim

Aşağıdaki gibi bir hata alıyorsanız bunun anlamı şudur. Daha önce ile bağlantı yaptığınız makinanın kendini tanımlaka için kullandığı anahtar değişmiş demektir. Bunun farklı nedenleri olabilir

  • arada birisi man-in-the-middle saldırısı yapıyordur (kısaca yaptılarınızı takip ediyordur veya takip etmeye çalışıyordur)
  • bağlandığınız makina değişmiştir
  • bağlandığınız makinanın private keyi yeniden oluşturulmuştur.

eğer saldırı olmadığından eminseniz /home/kullanıcı/.ssh/ dosyasını önce yedekleyin (gerek olabilir) sonra bir editor ile açın ve hata mesajında belirtilen (/home/admin/.ssh/:12 burada 12. satır) satırı silip keydedip çıkın. sonraki bağlantıda tekrar oluşacaktır.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
2a:ba:3c:fb:26:47:59:d2:ab:9b:cd:69:41:d6:e4:80.
Please contact your system administrator.
Add correct host key in /home/admin/.ssh/known_hosts to get rid of this message.
Offending key in /home/admin/.ssh/known_hosts:12
RSA host key for 192.168.0.17 has changed and you have requested strict checking.
.
Bookmark and Share
Tags: , ,

Tags: , ,

4
Feb

Ssh ve Cron ile Otomatik Uzak Yedekleme

   Posted by: İsmail ÇAKIR    in Bilgi Ve Deneyim

1. iki makinamızda da recep isimli kullanıcılarımız var diyelim.
iki makinamızın birbirini host olarak görmesi lazım
/etc/hosts dosyasına ekliyoruz
192.168.2.2 client
192.168.2.3 sunucu

şeklinde.

2. “-keygen” komutu ile private/public anahtarlar oluşutuyoruz.
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/recep/.ssh/id_rsa):

Burda 3 defa entera basıp varsayılanlarla devam ediyoruz.

Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/recep/.ssh/id_rsa.
Your public key has been saved in /home/recep/.ssh/id_rsa.pub.

Home dizinininde bulunan .ssh dizinine 2 dosya oluşutmuş bulunmaktayız. ~recep/.ssh/id_rsa gizli anahtardır, ve ~recep/.ssh/id_rsa.pub genel anahtardır.
Gizli anahtarın kimsenin eline geçmemesi gerekiyor bu yüzden okuma iznini kaldırıyoruz.

$ chmod 700 ~recep/.ssh/id_rsa
$ chmod 700 .ssh

3. genel anahtarımız id_rsa.pub dosyasını karşıdaki servera atıyoruz, ftp veya scp ile .
cd .ssh # .ssh yoksa mkdir .ssh; chmod 700 .ssh;
cat id_rsa.pub >> authorized_keys2
rm -f id_rsa.pub #kendimizinkini oluşturucagız karşıya attigimizi silmemiz gerekiyor.
chmod 700 authorized_keys2

Bunu yaptığımızda

$ ssh sunucu ls

şeklinde komut verdiğimizde karşıda icra olucaktır. şifre soruyorsa ssh-keygen -t rsa ile karşıda anahtar oluşturun veya dosya haklarını ayarlamamışızdır.

karşıdaki yedekleme komutumuz mesela ftpyedek olsun.

crontab -e
0 2 * * * ssh sunucu /usr/bin/ftpyedek

şeklinde bir cronla her gece 2 de yedeklemesini sağlayabilirsiniz.

Bookmark and Share
Tags: , , , , ,

Tags: , , , , ,

25
Jan

komut satırından vmware çalıştırma

   Posted by: Muhammed YÜRÜRDURMAZ    in Bilgi Ve Deneyim

eğer vb bir sistem üzerinden veya grafik ekran olmadan bir şekilde üzerindeki bir sanal makinayı çalıştırmanız gerek olursa işte komut

 -T ws start vmx_dosyasinin_tam_adresi.vmx 

eğer workstation kullanıyorsanız -T ws server kullanıyorsanız -T server

nogui verdiğiniz zaman grafik ekraana ihtiyaç duymadan açar.

start yerine koyabileceğiniz diğer komutlar

stop : durdurmak için
reset : resetlemek için
suspend : uyutmak için
pause : pause moda geçmek için
unpause : pause durumundan kurtarmak için

detaylı bilgi için vmrun komutunu çalıştırın. şu parametreleri görürsünüz.


Usage: vmrun [AUTHENTICATION-FLAGS] COMMAND [PARAMETERS]

AUTHENTICATION-FLAGS
--------------------
These must appear before the command and any command parameters.

   -h   (not needed for Workstation)
   -P   (not needed for Workstation)
   -T  (ws|server|server1|fusion)
     for example, use '-T server' for Server 2.0
                  use '-T server1' for Server 1.0
   -u   (not needed for Workstation)
   -p
  (not needed for Workstation)
   -gu 
   -gp


POWER COMMANDS           PARAMETERS           DESCRIPTION
--------------           ----------           -----------
start                    Path to vmx file     Start a VM or Team
                         [gui|nogui]

stop                     Path to vmx file     Stop a VM or Team
                         [hard|soft]

reset                    Path to vmx file     Reset a VM or Team
                         [hard|soft]

suspend                  Path to vmx file     Suspend a VM or Team
                         [hard|soft]

pause                    Path to vmx file     Pause a VM

unpause                  Path to vmx file     Unpause a VM

SNAPSHOT COMMANDS        PARAMETERS           DESCRIPTION
-----------------        ----------           -----------
listSnapshots            Path to vmx file     List all snapshots in a VM

snapshot                 Path to vmx file     Create a snapshot of a VM
                         Snapshot name

deleteSnapshot           Path to vmx file     Remove a snapshot from a VM
                         Snapshot name

revertToSnapshot         Path to vmx file     Set VM state to a snapshot
                         Snapshot name

RECORD/REPLAY COMMANDS   PARAMETERS           DESCRIPTION
----------------------   ----------           -----------
beginRecording           Path to vmx file     Begin recording a VM
                         Snapshot name

endRecording             Path to vmx file     End recording a VM

beginReplay              Path to vmx file     Begin replaying a VM
                         Snapshot name

endReplay                Path to vmx file     End replaying a VM

GUEST OS COMMANDS        PARAMETERS           DESCRIPTION
-----------------        ----------           -----------
runProgramInGuest        Path to vmx file     Run a program in Guest OS
                         [-noWait]
                         [-activeWindow]
                         [-interactive]
                         Complete-Path-To-Program
                         [Program arguments]

fileExistsInGuest        Path to vmx file     Check if a file exists in Guest OS
                         Path to file in guest

setSharedFolderState     Path to vmx file     Modify a Host-Guest shared folder
                         Share name
                         Host path
                         writable | readonly

addSharedFolder          Path to vmx file     Add a Host-Guest shared folder
                         Share name
                         New host path

removeSharedFolder       Path to vmx file     Remove a Host-Guest shared folder
                         Share name

listProcessesInGuest     Path to vmx file     List running processes in Guest OS

killProcessInGuest       Path to vmx file     Kill a process in Guest OS
                         process id

runScriptInGuest         Path to vmx file     Run a script in Guest OS
                         Interpreter path
                         script_text

deleteFileInGuest        Path to vmx file     Delete a file in Guest OS
                         Path in guest

createDirectoryInGuest   Path to vmx file     Create a directory in Guest OS
                         Directory path in guest

deleteDirectoryInGuest   Path to vmx file     Delete a directory in Guest OS
                         Directory path in guest

listDirectoryInGuest     Path to vmx file     List a directory in Guest OS
                         Directory path in guest

copyFileFromHostToGuest  Path to vmx file     Copy a file from host OS to guest OS
                         Path on host
                         Path in guest

copyFileFromGuestToHost  Path to vmx file     Copy a file from guest OS to host OS
                         Path in guest
                         Path on host

renameFileInGuest        Path to vmx file     Rename a file in Guest OS
                         Original name
                         New name

captureScreen            Path to vmx file     Capture the screen of the VM to a local file
                         Path on host

writeVariable            Path to vmx file     Write a variable in the VM state
                         [runtimeConfig|guestEnv]
                         variable name
                         variable value

readVariable             Path to vmx file     Read a variable in the VM state
                         [runtimeConfig|guestEnv]
                         variable name

VPROBE COMMANDS          PARAMETERS           DESCRIPTION
---------------          ----------           -----------
vprobeVersion            Path to vmx file     List VP version

vprobeLoad               Path to vmx file     Load VP script
                         'VP script text'

vprobeReset              Path to vmx file     Disable all vprobes

vprobeListProbes         Path to vmx file     List probes

vprobeListGlobals        Path to vmx file     List global variables

GENERAL COMMANDS         PARAMETERS           DESCRIPTION
----------------         ----------           -----------
list                                          List all running VMs

upgradevm                Path to vmx file     Upgrade VM file format, virtual hw

installtools             Path to vmx file     Install Tools in Guest

clone                    Path to vmx file     Create a copy of the VM
                         Path to destination vmx file
                         full|linked
                         [Snapshot name]

Examples:

Starting a virtual machine with Workstation on a Windows host
   vmrun -T ws start "c:\my VMs\myVM.vmx"

Stopping a virtual machine with Server on a  host
   vmrun -T server -h https://myHost.com/sdk -u hostUser -p hostPassword stop "[storage1] vm/myVM.vmx"

Running a program in a virtual machine with Workstation on a Windows host with Windows guest
   vmrun -T ws -gu guestUser -gp guestPassword runProgramInGuest "c:\my VMs\myVM.vmx" "c:\Program Files\myProgram.exe"

Running a program in a virtual machine with Server on a  host with  guest
   vmrun -T server -h https://myHost.com/sdk -u hostUser -p hostPassword -gu guestUser -gp guestPassword runProgramInGuest "[storage1] vm/myVM.vmx" /usr/bin/X11/xclock -display :0

Creating a snapshot of a virtual machine with Workstation on a Windows host
   vmrun -T ws snapshot "c:\my VMs\myVM.vmx" mySnapshot

Reverting to a snapshot with Workstation on a Windows host
   vmrun -T ws revertToSnapshot "c:\my VMs\myVM.vmx" mySnapshot

Deleting a snapshot with Workstation on a Windows host
   vmrun -T ws deleteSnapshot "c:\my VMs\myVM.vmx" mySnapshot
Bookmark and Share
Tags: , , ,

Tags: , , ,

Switch to our mobile site