 Sekarang saya akan cuba menghidupkan server ini. Mereka juga mempunyai IP. Jika tidak, saya akan tunjukkan lagi. Jika anda mempunyai Windows 10, 18.03 dan lebih, Microsoft telah menghidupkan SSH ke Windows dan digunakan dengan default. Jika tidak, anda boleh menghidupkan menggunakan command SSH. Ini bagus kerana command SSH akan sama dengan command SSH di Linux atau Mac. Apabila anda mempunyai SSH, di sini akan menghidupkan semua yang sama. Jika anda menggunakan putih, interface akan sedikit berbeza, tetapi fungsi adalah sama. Okey, SSH ke. Jadi, bagaimana SSH ke? Sebenarnya, sebab menggunakan password untuk menghidupkan, anda boleh menggunakan SSH ke. Jadi, apa yang berlaku adalah bahwa server SSH akan menghidupkan sesuatu keputusan kepada klien anda dan anda akan mencari bahwa anda mempunyai ke. Dan jika anda mempunyai ke, anda akan menghidupkan ke. Bukan anda mempunyai ke dalam password. Jadi, anda perlu menghidupkan listan atau tidak. Jika anda perlu menghidupkan keadaan server untuk mengenai server anda. Bukan anda menghidupkan keadaan server untuk mengenai ke. Jadi, anda akan menggunakan ke dan menggunakan ke dalam server. Jadi, bagaimana yang di sini anda menggunakan ke? Jika anda menggunakan ke dalam keadaan server, kebanyakan anda sudah mempunyai SSH ke. Jadi, mari kita bincangkan bagaimana untuk menggunakan SSH ke. Jadi, jika anda mempunyai ke dalam keadaan server, saya akan menyebabkan itu nanti. Jika anda mempunyai ke dalam keadaan server, atau jika anda mempunyai keadaan server di dalam keadaan server, jika anda mempunyai ke dalam keadaan server, maka itu adalah keadaan SSH ke. Jadi, saya akan membuat... Sekarang, saya akan menyebabkan anda menggunakan ke dalam keadaan server 25519. Kenapa? kerana ke dalam keadaan server yang lebih kecil, tetapi ada peluang keadaan server yang tidak mencari ke dalam keadaan 25519. Jadi, di dalam keadaan, anda mungkin perlu membuat ke dalam keadaan RSA. Tapi, saya akan membuat keadaan demo dengan ke dalam keadaan 25519. Jadi, saya akan meminta anda ke mana untuk mencari ke dalam keadaan. Jika anda tidak membuat ke dalam keadaan sebelumnya, ke dalam keadaan ke dalam keadaan adalah baik. Tapi saya mempunyai ke dalam keadaan saya sendiri, jadi saya tidak akan membuat ke dalam keadaan. Okey, saya akan meminta anda ke dalam keadaan RSA. Jadi, ke dalam keadaan RSA adalah untuk menggantikan ke dalam keadaan SSH. Jadi, kenapa anda ingin menggantikan ke dalam keadaan SSH? Jadi, bagaimana jika seseorang lain dapat file itu, anda tidak mahu mereka dapat memasangkan ke dalam keadaan. Baiklah, barely enter dan ini ada sesuatu ke agree barang, mobil dekat bудь jaja tentu, arah теперь, ke dalam keadaan anda telah dibuat, dan lantai. Jadi jika anda masuk ke ke depan, yjalah ke dalam keadaan click ini. Ini adalah le reasons.iy pada ke dalam keadaan 25519. Jadi, ini adalah sebilas ke masuk ke dalam keadaan. Ini adalah sebuah jah reap Uganda. Kemudian ada juga pilihan public-key yang hanya ada di .ssh slash id at 25519.pub Jadi pilihan public-key ini adalah pilihan yang digunakan di server supaya server boleh menggunakan itu untuk menggantikan anda Okey, jadi... Adakah saya tidak ikut? Baiklah Jadi sekarang kita membuat pilihan kita Baiklah, mari saya masuk ke dalam Windows Okey Jadi jika anda di Windows kita akan menggunakan perkara ini Okey, jika anda tidak mempunyai pilihan pilihan ssh anda boleh menggunakan perkara ini dan ada perkara ini pilihan pilihan yang anda boleh menggantikan Baiklah, jadi sekarang saya menunjukkan perkara ini pilihan pilihan yang hanya ada di sini Okey, kemudian anda boleh... anda boleh membuat pilihan baru ia sama, terutamanya hanya pilihan grafis Jadi anda hanya... memilih pilihan yang seperti di 25519, kita membuat pilihan pilihan dan ia meminta anda membuat pilihan rendam Kemudian selepas itu anda boleh menggunakan pilihan periuk atau pilihan periuk untuk mengambil pilihan Okey, saya akan... Kemudian selepas itu, anda... anda membuat pilihan pilihan pilihan Ya, tunggu... Ya, kemudian anda membuat pilihan Jadi ia akan bekerja sama Sebenarnya, apapun anda membuat pilihan dengan pilihan pilihan Poti tentu-tentu anda tidak boleh menggunakan pilihan hanya boleh memakai pilihan Poti Setidaknya anda boleh membuat pilihan pilihan yang boleh digunakan dengan pilihan SSH Ya, jika anda perlukan Jadi anda akan membuat pilihan periuk dan membuat pilihan SSH untuk membuat pilihan kelihan baru dan anda akan mengumpulnya dengan... ID, apa-apa ID, ED25519 dan anda boleh membuat pilihan dengan pilihan SSH Ya, tapi... jika anda hanya menggantikan ini, jika anda menggunakan komen lain atau menggunakan 4K bagaimana anda menggantikan kawasan? jika anda seorang SOC student, anda boleh mencuba ini dengan sebuah senjata anda tahu apabila anda meledakkan senjata, anda pernah meledakkan senjata? jadi jika anda meledakkan senjata, tanpa menggantikan kawasan atau pasal anda selama-lamanya anda boleh hanya menggantikan kawasan SSH kemudian ketika anda perlu meledakkan senjata, anda tidak perlu menggunakan pasal anda jadi jika anda mencuba ini dengan senjata atau jika anda mencuba ini dengan serva ini biar saya demo bagaimana untuk menggantikan kawasan mari kita menggunakan kredensi yang saya telah beri kepada anda atau jika anda menggunakan senjata, anda boleh menggunakan senjata jadi idea adalah anda hanya menggunakan SSH copy ID dan kemudian anda hanya menggunakan kawasan yang sama dengan serva yang anda akan menggunakan jadi saya akan menggunakan u100 jadi kemudian kita perlu meminta anda untuk pasal kerana anda belum menggunakan kawasan jadi anda belum dapat menggunakan login jadi, mari saya mencuba pasal saya okey, kemudian anda akan menggunakan kawasan yang ada satu atau dua anda akan menggunakan satu jika anda hanya mempunyai satu kawasan kerana saya sendiri mempunyai dua kawasan jadi anda akan menggunakan semua kawasan saya jadi sekarang jika saya hanya mencuba SSH jika saya hanya menggunakan SSH, anda tidak akan meminta saya untuk pasal itu bagus okey, anda akan meminta anda untuk pasal kawasan jika anda tidak mempunyai pasal SSH yang anda menggunakan yang saya akan menggunakan sekarang okey, sebelum itu saya menggunakan kawasan ini jadi jika anda tidak dapat menggunakan kawasan SSH jika anda menggunakan seperti apa itu? Pajen? tidak jika anda menggunakan putih dan anda tidak mempunyai kawasan SSH jadi apa yang anda lakukan? mari saya mengubah kawasan saya dulu jadi sekarang kawasan saya sudah hilang jadi instruksi adalah di sini jadi apa yang anda lakukan adalah membuat kawasan SSH dan jadi okey, mari saya log-log sebenarnya mari saya log-log jadi sekarang apabila anda membuat apabila anda membuat kawasan anda apabila anda membuat apabila anda membuat kawasan public jadi mari kita periksa apa kawasan public ya, jadi ini adalah kawasan public dan anda hanya mempunyai kemudian anda menggunakan SSH kembali jadi ini adalah cara manual untuk menggunakan kemudian okey, saya perlukan pasal saya okey, mari saya menggunakan pasal ini lagi okey, dan sekarang saya perlu membuat kawasan SSH okey, saya sudah melakukannya kemudian saya akan mengambil kawasan untuk kawasan kawasan kembali jadi anda perlu menggunakan kawasan dengan betul maksud saya tidak menggunakan kawasan seperti kawasan British okey, kemudian kemudian perkara yang penting adalah anda perlu membuat permainan dengan betul jadi apa yang anda lakukan adalah perubahan mod adalah perubahan mod atau perubahan permainan 7.0.0 adalah hanya kawasan opal 7.0.0 jadi untuk ini ini hanya kawasan kerana saya tidak akan menggunakan kawasan SSH mod hari ini tapi 7.0.0 bermaksud bahawa pemilik boleh membaca dan membuat permainan kemudian kawasan kedua adalah untuk permainan kawasan jadi permainan kawasan tidak boleh melakukan apa-apa dan semua orang yang lain yang adalah permainan kawasan terakhir tidak boleh melakukan apa-apa jadi di Linux di Unix basically setiap permainan ada pengguna dan permainan dan jadi permainan ini menggunakan pengguna kepada pemilik dan kemudian orang lain seperti orang-orang yang tidak terkenal untuk membuat permainan dan 7.0.0 adalah sebuah kawasan jadi 4 adalah untuk membuat permainan 2 adalah untuk membuat permainan dan 1 adalah untuk membuat permainan dan anda hanya memasukkan mereka sebagai pengguna jadi jika anda mahu membuat permainan dan membuat permainan tapi tidak membuat permainan kemudian ia adalah 6 dan sebagainya tetapi ini bukan sebuah kawasan hari ini jadi saya mahu membuat kawasan mod 700 SSH idea adalah untuk mempercaya orang-orang dari memasukkan kawasan SSH sebab SSH akan sebenarnya mengusahkan jika permainan anda tidak telah dikawal segera seperti itu terutamanya, kawasan kawasan yang dilihat terutamanya jika kawasan kawasan yang dilihat boleh dilihat dengan dunia bermakna sesiapa boleh dilihat ia akan sebenarnya tidak membuat anda memulai kawasan sebab ia tidak tahu jika seseorang mungkin mempunyai atau memasukkan kawasan sendiri menjadi kawasan kawasan kawasan kawasan yang dilihat jadi saya akan tidak membuat gaun dan sekarang saya akan tunjukkan itu jika saya boleh memajukan Kawasan SDSW sebetul Dayangan Becca jadi kamu boleh задач bersama para api sticker ialah tepat bermaksud anda hanya menggunakan data k così dan & you Sans Fire akan okey okey jadi kamyun kawasan SDSW jadi sekarang sekarang siapa anda homeswapi anda harap Kami tidak mahu membuat itu. Jadi, kami hanya mahu meminta alih alih alih. Apa yang alih alih berlaku adalah anda memasang alih alih alih. Dan kemudian, sejauh-jauh, sejauh-jauh, sejauh-jauh, sejauh-jauh, sejauh-jauh, sejauh-jauh, sejauh-jauh, sejauh-jauh, jauh-jauh, jauh-jauh, jauh-jauh, dan ia dapat membuat alih alih alih pada klien SHH apabila ia diperlukan. Jadi, secara mudah, kami akan mempunyai profil anda atau RAC, etc. untuk memulai alih alih. Jadi, saya memulai alih di sini untuk membuat ini. Jadi, profil anda dan RAC adalah sesuatu yang memulai apabila alih berulang. Tapi saya tidak akan menghubungi itu hari ini. Tapi idea yang penting adalah anda mempunyai alih seperti ini dalam alih anda. Kita akan memulai alih ini dulu. Ini akan menambah beberapa alih alih. Kemudian anda dapat memulai alih SHH. Oh, bila-bila, bagi anda yang memakai alih 10 alih alih, alih SHH tidak berhasil pada alih alih. Jadi, saya minta maaf tentang itu. Anda mungkin mempunyai anda dapat mencuba dengan alih alih. Ya. Tetapi pada alih alih, jika anda memulai alih alih, anda dapat memulai alih alih SHH supaya anda memulai alih yang penting. Jadi, anda akan memulai alih alih ke dalam profil anda. Sebenarnya, di sini. Ini adalah alih alih. Jadi, ini akan membantu anda memulai alih alih anda ketika alih alih anda memulai alih. Apabila anda memulai alih alih anda, dan memulai alih alih. Ya. Kemudian anda akan memulai alih. Kemudian apabila anda memulai alih alih, anda dapat memulai alih SHH dan anda akan memulai alih. Kemudian anda akan memulai alih anda ketika anda memulai alih. Saya tidak akan memulai alih ini. Saya tidak akan memulai alih. Okey. Jadi, sekarang saya akan menunjukkan bagaimana saya memulai alih untuk memulai alih ini secara manual. Jadi, jika anda memulai alih, anda perlu memulai alih. Dan apa yang anda gunakan adalah perkara yang di sini. Baiklah. Tidak, maaf. Ya. Anda akan memulai alih ini ke alih alih. Alih alih alih. Kemudian, apa yang anda boleh lakukan dengan Windows adalah anda dapat memulai alih ini yang disebut Pajen. Anda dapat memulai alih ini dan anda hanya memulai alih. Anda dapat memulai alih. Sekarang anda memulai alih, anda dapat memulai alih. Anda dapat memulai alih. Anda dapat memulai alih. Anda dapat memulai alih. Anda hanya memulai alih. Jadi, ia berlaku sama dengan alih yang di luar. Ia hanya grafis. Saya sebenarnya lupa pasal saya. Okey. Ya. Jadi, sekarang saya memulai alih. Jika anda memulai alih dan anda hanya memulai alih, anda tidak akan bertanya untuk pasal. Tetapi saya tidak sebenarnya memulai alih ini. Tetapi anda dapat idea. Bagaimana anda dapat idea untuk memulai alih? Okey. Bercakap tentang ini. Ya. Jadi, jika anda memulai alih, saya lupa muka saya lagi. Jika anda memulai alih, keadaan itu adalah jika anda memulai alih dan anda memulai alih ini. Anda memulai alih itu. Tetapi jika anda memulai alih dan anda hanya dapat memulai alih ini. Sebenarnya, dalam alih ini, seperti alih anda di rumah ssh dan keadaan ini. Jadi, anda hanya memulai alih konten itu. Jadi, ya. Saya harap itu menjawab soalan anda. Semuanya. Okey. Adakah anda ada soalan? Jika anda memulai alih. Adakah anda memulai alih? Jika anda memulai alih, sebenarnya, ia seperti VPN. Jadi, ia membuat anda memulai keadaan yang lain untuk memulai alih yang lain. Jadi, bagaimanapun, saya memiliki soalan yang lain yang lain. Dan saya mahu memulai alih yang lain daripada masin lokal saya. Saya hanya memulai alih yang lain untuk sebuah sebab apa-apa. Kemudian, anda boleh memulai alih ssh dan saya akan memulai alih yang lain untuk masin saya. Jadi, saya akan menghubungi alih untuk masin saya. Dan alih ssh itu mendengar bahawa ia akan menghubungi alih untuk masin remote. Dan kemudian, anda akan pergi ke tempat yang betul. Jadi, saya akan memulai alih ini. Jika anda semua menghubungi alih yang lain, saya akan membawa lagi. Jika anda semua menghubungi alih ssh, saya akan memulai alih yang lain untuk memulai alih ini. Tapi ia akan mendengar lokalnya saja. Dan anda akan cuba memulai alih untuk menghubungi alih. Okey? Ia sebenarnya menghubungi alih tapi saya akan... Mari kita cuba menghubungi alih. Saya akan berhubungi dan menghubungi alih dengan alih ssh. Jadi, mari kita beritahu bagaimana ia telah dibuat. Jadi, anda boleh cuba dan cuba diri sendiri. Saya hanya ingat bahawa alih ssh adalah 8,000. Tapi, saya akan menunjukkan contohnya. Jadi, saya akan menghubungi alih dan alih. Dan kemudian, saya akan menghubungi lokal saya. 770. Okey, alih ini anda boleh memilih apa-apa yang anda mahu. Kerana ini adalah apa yang di sisi lokal. Kemudian, saya akan menghubungi alih ini di komputer remote ke lokal. Dan saya akan menghubungi alih 8,000. Okey? Kemudian, saya akan menghubungi diri saya. Jadi, sekarang, ia telah dibuat. Dan tidak ada apa-apa yang berbeza daripada alih ini. Tetapi, tidak ada apa-apa yang berbeza daripada alih ini. Sekarang, jika saya kembali ke 5V dan saya akan menghubungi lokal 770. Ta-dah! Dan saya dapat melihat apa-apa. Jadi, saya akan menghubungi alih ini. Dan saya akan menghubungi alih 8,000 pada masin ini. Dan lihat jika anda dapat menghubungi alih 8,000. Ya. Bagaimana dengan alih 8,000? Alih 8,000 adalah kriptografi asymetrik atau sistem kriptografi publik. Jadi, seperti RSA. Ia berfungsi pada kriptografi elliptik. Jadi, saya tidak mengenai alih 8,000. Ia adalah sistem kriptografi publik. Seperti RSA. Ia berfungsi berbeza. Ia tidak sangat penting. Jika anda hanya menggunakan alih 8,000. Ya. Jika anda ingin mengenai kriptografi, itu sebuah subjek teknik. Dan ia lebih tentang alih 8,000. Ia bukan apa-apa saja. Adakah anda berusaha untuk menghubungi? Baiklah. Saya dapat melihat beberapa koneksi. Bagus. Ya, bagus. Adakah anda perlukan bantuan? Saya akan datang. Kerana saya rasa ini salah satu yang lebih besar daripada alih ini. Baiklah. Jika anda menggunakan alih 8,000. Jika anda menggunakan alih 8,000, anda dapat menggunakan alih 8,000. Jika anda menggunakan alih 8,000, sebenarnya, anda akan menggunakan alih 8,000 di bawah SSH dan alih. Jadi, ia sama. Jadi, anda mengubah alih 12,000. Bagi yang saya katakan, alih 7,700 dan alih 8,000 di destan. Anda ingin mengusah alih 8,000. Dan anda akan menggunakan alih 7,700 ke alih 8,000. Jika anda menggunakan alih 7,700, anda akan menggunakan alih 8,000. Samвет ini naik di luar. Bahkan saya beritahu. B Kerana anda boleh bota pertamayan badan pertama Jika anda boleh bota pertamayan pertama aquest ment只 terdapat dekat port 12345 untuk port 5679 diurus di remote. So R is just this in reverse, i.e. instead of redirecting from U to the other side, you redirect from the other side to U. So that's for example, in case you have something running on your computer and you want to access it from the server, kemudian anda menggunakan R, dan jika anda mahu, ya, ia sebenarnya hanya arahnya L adalah dari tempat lokal ke remod, R adalah dari tempat remod ke tempat lokal Okey, dan tentu saja anda boleh melakukan perkara lain untuk contoh, jika anda mengubah tempat lokal ke beberapa tempat lain seperti sayang google.com, kemudian anda boleh menghubungi Google dengan sebuah serva ini, dan jadi anda menggunakan serva ini sebagai sebuah proksi atau bahkan sebuah serva, okey, bukan sebuah serva, tapi sebuah sepertinya okey, ini tidak sebenarnya kerja kerana, apa yang anda nampaknya, soalan SSL kerana google.com, soalan google.com bukan untuk tempat lokal, betul, tetapi idea itu di sana. Jadi, semua orang okey? Okey, saya akan hanya menghubungi yang juga lebih berkembang. Jadi, soalan SSL soalan Proksi, anda tahu apa soalan Proksi adalah sesuatu yang akan berlaku, seperti anda menghubungi, anda menghubungi koneksi anda dengan sebuah, jadi sebagainya seperti lelaki VPN, sebagainya, sebagainya seperti apa yang berlaku dengan lelaki komersial yang anda gunakan sekarang, itu sebagainya sebuah proksi untuk koneksi anda, tetapi anda boleh menggunakan SSL soalan Proksi. Jadi, apa yang saya maksudkan? Jadi sekarang, apabila saya katakan SSH D12345, ia akan membuka sebuah soalan Proksi di tempat lokal, dan kemudian, kemudian semuanya, kita menghubungi sebuah koneksi SSH dan keluar dari remote. Jadi, banyak program boleh menggunakan soalan Proksi, jadi mereka boleh, jika anda hanya menggunakan koneksi SSH sebagai soalan Proksi, kemudian anda boleh hanya memungkinkan koneksi anda. Jadi, biar saya beri anda contoh, okey? Jadi sekarang, jika saya minta untuk IP saya, jika saya minta untuk IP saya, ia beritahu saya ini, okey? Ini sebenarnya dalam network NUS. Jadi sekarang jika saya pergi ke, jadi saya akan gunakan D, mari kita katakan 8443, okey? Jadi sekarang saya menggunakan 8443 sebagai soalan Proksi di tempat lokal saya. Jadi, apa yang saya boleh lakukan adalah saya pergi ke Firefox, bagi contoh, saya pergi ke Firefox, atau anda boleh menggunakan Chrome, ia sama. Anda lihat untuk setelah Proksi, okey? Dan anda pergi ke koneksi manual, dan anda pergi ke jalan-jalan untuk host soalan, host UK, host lokal. Jadi, saya menggunakan port 8443. Anda boleh menggunakan mana-mana port, ia berada pada anda sejauh sejauh sejauh sejauh sejauh tidak dipergunakan, okey? Kemudian sekarang, apa koneksi yang saya buat dari Firefox adalah redirected tru SSH. Jadi, jika saya minta untuk apa adalah IP saya sekarang, anda lihat bahawa, oh, ini sebenarnya ini, ini berubah. Jadi, ini adalah yang terbelakang. Jadi, ini adalah IP NUS, seperti salah satu IP-nya, dan sekarang saya menghubungkan dari server. Jadi, jika anda mempunyai server di tempat lain di Singapura, kemudian anda boleh menggunakan untuk membuangkan beberapa keputusan jio. Bukan semua, ia seperti VPN, seperti itu. Ya, tetapi Socks Proxy bukan seperti perangkat VPN, kerana VPN akan menghubungkan setiap koneksi, seperti oleh aplikasi di sistem anda. Socks Proxy adalah anda perlu menggunakan aplikasi anda untuk menggunakan aplikasi anda untuk menggunakan aplikasi anda untuk menghubungkan dan menggunakan. Dan bukan semua akan mendukung Socks Proxy, tetapi terutamanya program yang terbesar adalah SSH sendiri mendukung menggunakan Proxy dan sebagainya. Kamu semua boleh pergi dan cuba ini. Jadi, okey, biar saya menggunakan sebuah contoh yang berbeza. Jadi, saya sebenarnya mempunyai sebuah ocean digital. Saya mempunyai server yang bergerak di London. Sebenarnya, saya mempunyai server yang bergerak di London kerana Telegram data centre di London. Jadi, bot Telegram saya bergerak di server London. Jadi, ia seperti lebih cepat. Jadi, biar saya menghubungkan lokal ini. Saya akan menghubungkan ini. Dan saya akan menggunakan SSH kepada server London saya. Saya minta maaf, saya tidak dapat menunjukkan itu di sisi. Saya tidak akan meminta untuk meminta IP saya, maaf. Tapi saya akan meminta Google untuk keadaan saya. Ini adalah masalah apabila koneksi awak nampak seperti jika ia datang dari Mediodes or Off. Apabila koneksi awak datang dari server IP, Google akan menyakiti keadaan. Kerana ia seperti, kenapa awak berhubungkan dari server dan earn. Ia mengambil sangat lama. Ya. Jadi, anda akan melihat bahawa saya di London, Selao. Jadi, ya. Mari kita just turn it off. Kamu semua boleh cuba untuk cuba untuk serva yang... Mari saya bawa lagi. Untuk menerima pembentangan saya. Okey, mari kita jemputkan. Semua orang okey? Okey, jadi Windows Potee ada semua ini. Kamu boleh buat dengan Potee. Okey, X-Forwarding. Jadi, jika kamu menggunakan Linux, kamu akan mencari serva X. Jadi, serva yang ada di serva X, serva X membuatnya biar programnya menjelaskan sesuatu di deskripsi kamu. Jadi, perkara yang penting adalah kamu boleh biar program remote menghubungkan di deskripsi kamu. serva X. Dan kemudian, mereka boleh menunjukkan sesuatu di deskripsi kamu. Jadi, jika kamu... jika kamu boleh... jika kamu mempunyai... jika kamu mempunyai komputer Linux, dan kamu mahu mencari program grafis, kamu boleh menggunakan serva X. Jadi, jika kamu mempunyai SSH-X dan sesuatu yang biar normal... sesuatu yang biar normal menghubungkan. Kemudian, kamu akan mencari programnya dengan sesuatu yang biar SSH-Session. Dan kamu akan... Windows akan menghubungkan di deskripsi kamu. Jadi... jika kamu... jika kamu mempunyai SSH-Session, dan kamu mempunyai Sunfire, kamu boleh mencari ini. Jadi, saya akan menghubungkan Sunfire sekarang. Okey. Kamu lihat bahawa saya menghubungkan desa X. Jadi sekarang saya akan... jadi saya sebenarnya telah mencari ini dan ada beberapa program yang mempunyai di Sunfire. Satu dari mereka adalah Firefox. Jadi, mari kita menggunakan Firefox di Sunfire. Dan ia akan menjadi lebih kecil. Jadi sekarang kita mempunyai Firefox yang menggunakan Firefox. Dan... bagaimana versi ini? Ada sesiapa yang ingin menggunakan? Ya. Jadi, Sunfire mempunyai Firefox. Ia adalah sebuah hari yang baik. Dari 2009, 10 tahun lalu. Dan kamu boleh menghubungkan wab dari Sunfire jika kamu benar-benar mahu. Saya tidak pasti apa yang kamu akan lakukan. Tetapi, apa pun, ini adalah sebuah jenis desa X. Jadi... Oh, dan perkara lain yang kamu boleh lakukan di Sunfire adalah menggunakan Office Open. Jadi, jika kamu ingin... saya tidak tahu mengapa kamu akan menggunakan Office Open di Sunfire. Tapi kamu boleh lakukan. Jadi, ini menggunakan Sunfire, bila-bila. Dan untuk para pelajaran-pelajaran non-SOC, Sunfire adalah sebuah serva yang yang SOC berikan bahawa semua pelajaran-pelajaran boleh berhubung. Jadi ini menggunakan Sunfire. Ia sebenarnya sangat menarik. Ya. Jadi, ini adalah software 10 tahun yang berlaku. Dan kamu boleh... ok. Ia ada lebih serius aplikasi. Ini adalah sebuah kebanyakan yang paling perlukan. Kamu boleh cuba jika kamu menggunakan Linux sekarang. Sekarang, anda mempunyai insolasi local Linux. Jika anda mempunyai Windows, anda dapat menggunakan server X. Sebenarnya, ia berlaku. Sebenarnya, saya fikir bahawa keadaan menggunakan keadaan adalah sedikit rendah. Sebenarnya, sebuah jalan menggunakan Sightwind. Mereka mempunyai server Windows X. Kemudian anda dapat mengintegrasi dengan Puti untuk membuat keadaan X. Sebenarnya, anda dapat menggunakan X-Ming, X-M-I-N-G. Sebenarnya, ia tidak mempunyai software Free. Jadi, saya tidak dapat memunyai keadaan sebab saya tidak mempunyai keadaan. Saya fikir Mac mempunyai keadaan X-Quartz. Jika anda memunyai Mac, anda dapat menggunakan keadaan X-Quartz dan membuat keadaan juga. Saya fikir bahawa ia mempunyai keadaan X2. Ini tidak benar-benar sebuah X-server. Jadi, ini adalah keadaan Windows. Saya tidak dapat menemukan keadaan ini. Saya cuba menemukan keadaan Free dengan keadaan Windows. Tetapi, keadaan ini mempunyai keadaan. Saya rasa anda boleh cuba jika anda mempunyai keadaan Windows. Anda dapat menggunakan keadaan Pote dan melihat bagaimana ia berlalu. Tetapi, saya benar-benar fikir bahawa keadaan yang anda akan membuat keadaan X-Folding adalah sedikit rendah. Kerana X sebagai protokol, ia tidak mempunyai keadaan network. Sebenarnya, ia membuat keadaan yang lebih rendah. Jadi, ia mempunyai keadaan yang lebih rendah. Sebenarnya, anda tidak akan membuat keadaan X dengan koneksi remote. Kerana keadaan ini sangat tinggi. Kemudian, saya menghubungkan browser saya. Okey, mari kita bergerak. Okey. Satu-satunya bahagian tentang SSH. Configurasi SSH. Jadi, jika anda nampak apabila saya mempunyai keadaan SSH. Saya akan menunjukkan itu lagi. Apabila saya mempunyai keadaan SSH. Saya hanya mempunyai keadaan SSH. Saya tidak mempunyai keadaan saya dan tidak mempunyai keadaan. Meskipun, keadaan saya tidak mempunyai keadaan SOC. Tetapi, ia mempunyai keadaan. Sebenarnya, apa yang saya lakukan adalah... ...dia mempunyai keadaan SSH. SSH. Configurasi SSH. Apabila anda dapat memasak keadaan SSH. Dan... Ya. Jadi, bagaimana? Anda memasak keadaan ini ke keadaan SSH. SSH. SSH. Configurasi SSH. Kemudian, anda dapat... ...selepas itu, anda dapat... ...selepas anda memasak keadaan SSH. Meskipun, saya memasak keadaan SSH. Saya memasak keadaan SSH. Mereka akan memasak keadaan SSH dengan SONFIRE. Dan kemudian, anda akan memasak keadaan SONFIRE.com... ...dengan SOS.edu.sg. Dan anda dapat mengesikkan nama utama anda. Atau anda dapat mengesikkan keadaan lain. Jika anda mahu mempunyai keadaan SSH... ...selepas itu, anda mahu mempunyai keadaan S11... ...selepas itu, anda mahu mempunyai keadaan S11... ...dan sebagainya. Ya, dan ia dapat sangat berguna. Jika anda tahu tentang SOSE Compute Cluster... ...sebenarnya, ia adalah sebuah komputer... ...dengan sebuah processor SONFIRE... ...yang banyak sebab anda dapat membuat komputasi. Dan semua nama utama... ...sebenarnya, ia seperti X, C, N. Dan kemudian 1 letar dan kemudian 1 nama. Atau 1 letar dan kemudian 2 nama. Jadi, keadaan ini adalah... ...awak mempunyai sebuah karakter. Jadi, saya akan memasak keadaan... ...selepas itu, saya akan memasak keadaan... ...selepas itu, saya akan memasak keadaan... ...bukankah komputer cluster yang diberi... ...bukan sebab ada masalah. Kamu anda boleh memasak ini dengan konfig ... ...kalau anda mempunyai... ...walaupun jika anda mempunyai... ...kemudian kamu mempunyai Potee... ...saya silang mempunyai-potee... ...dan membuat kamu mempunyai koneksi. Jadi, ini adalah koneksi Potee yang mempunyai koneksi,... ...seexet... It's for the command line So if you don't want to have this %h I mean you can just say like Specify your host And then specify your host name Listen, you can just specify as particular host like Like let's go back to this example Of this server right So I actually set up a configuration block for this server So when I want to SSH to this server I can just HTI hacker tools to And then I'm in la Okay I set the user in to root So How do you If you want to do this for this particular server Like this one The one that we are using Let me show you the example Let me show you the configuration for that So it's just like that So I just set host HTI Host name is the IP IP that I need to connect to Right And there are certain special characters you can use Like %h %h will be whatever you specify on the command line And then you can specify username and so on Ya So you can try this And just try connecting to this To our server here And then Ya So just some quality of life things Make your life easier So you don't have to keep Specifying your username and IP address every time We just remember Like okay I have this server HTI I have this server Sunfire Whatever Ya oh okay And proxy jump So If you notice something If you ever use a compute cluster You cannot connect to it directly From You cannot connect to it directly from Like outside SOC So if you're outside SOC network You actually have to Enter the network Before you can connect to the compute cluster So one of the ways is to use SSH as proxy jump Like So you connect to You connect to Sunfire first And then after that You via Sunfire You connect to the compute cluster server Whichever way it is So This way This configuration will do that Automatically for you So You just use proxy jump Your username at Sunfire Then you specify your username For the actual Compute cluster server But it's the same lah It's the same username Then after that You can just SSH Directly Or it means not direct But you just key in SSH this And it will make the jump for you Automatically So this proxy jump Corresponds to the Dash capital J flag Dash capital J Ya But normally If you're going to do it often Then you just specify in your Host configuration file SSH FS This one kind of Requires you to Have line-ups So I have installed SSH FS On the I have I have installed SSH FS On this thing On this server So Okay You can Try an SSH FS Mount Your Sunfire directory Onto Your user address directory Although Okay That's at your own risk Of course you'll be Entering your See account password But You can try I promise you I won't do anything Let me just show you a demo So So I'm connected now to Okay I'm going to use my local account As in my local computer To do the demo But you can try it If you have line-ups You can do it locally If you are Or you can just try it On the server And connect to Sunfire From the server So I'm going to make a directory That's called X And I'm going to SSH FS Sunfire And then Then you have to Make sure you have a colon at the end Of course The colon sort of Specifies The directory That You are going to mount So if you just leave it blank It will mount your home directory Meaning When I say home directory Is like When you first Go into Sunfire Like The directory that you are in So like This directory Is Your home directory So if I now SSH FS Sunfire And then I'm going to Mount it in directory X So I just do this Then now If I just LSX My stuff are there And I can just access it Like as if it were On the local computer But this Okay This works mainly on line-ups I'm not sure Does Mac have Fuse? Oh you can SSH FS On Mac also la Yes So I think you can try this on Mac also Ya It should work the same And then Now if you want to Disconnect that folder Then you just do Fuser mount Dash U Dash U means un-mount And then you Just un-mount the directory Then if I go back and check What's in X Now it's just an empty directory Ya So it's convenient la If you're working on Sunfire Or Like if you're working on A compute cluster Then You know Sometimes you don't want to keep Manually transferring files And there Then you can just use SSH FS Mount the directory And do your work As if the directory was local Alright Okay Mosh Okay This is where I Pull out my phone Oh my god It's 4 o'clock Okay So what Mosh is Is basically It's like SSH But the problem with SSH Is like If your Connection drops For example Then your session You lose your session la You just disconnect And you can't reconnect Ya If you reconnect again It's a new session So everything you're doing Is lost But Mosh is very special It's like It will work Even like if you are If you change network Or you disconnect For like 5 hours And come back That kind of thing So Just gonna So I have Mosh installed On the This server So you can see that Okay Okay I'm going to demo it Using my mobile data And on my phone Just to show you How I can Mosh to the server I'm gonna key my Ya So you see now I'm connected So I can just say Like I can do whatever Like LLS Okay So Now I'm connected still Okay I can do stuff If I Turn off my mobile data So now Mosh Will tell me that Network is unreachable And Ya I can't do anything But the moment I turn it back on I'll Is back And I can still Continue doing my work And nothing is lost So Pretty great Okay If you're using Android You can download this app It's called TerMarkz TerMarkz Ya Nowadays I can just do my If I really need to I can SSH into a server Or whatever From my phone On the go And fix stuff on the fly If I need to If I need to And ya So ya That's Mosh So the thing about Mosh Is you need to You do need to install it on What's that? You need to install it On both the server And the client On your own computer But You don't have to have root On the server to install it Although it's more convenient If you don't And the problem is Like NUS Network seems to block Mosh That's why I was using mobile data Too bad Alright RDP So this one I can't really Let y'all try RDP is basically The Windows version Of SSH Or X Forwarding Maybe It's basically like you Access a Windows desktop Remotely So if you were looking At this Windows Right It's not a VM It's actually This running on AWS It's just I just started A Windows server instance Just to demo Windows stuff So this running on RDP So If you're a Windows And you want to connect To another Windows computer You will use this thing Called Remote Desktop Connection And then you just Type the address Of the computer And then you can connect To it Right If you're on Linux Then You use This program called Free RDP Ya But I think the situations Where you have to do this Is quite low But I'm just Introducing it So if In case you ever have to do it You can Ya So And there's also a RDP server For Linux Oh Sorry, one more thing Officially only The Windows Pro version And above can be RDP servers But People have written a tool To sort of hack it I guess Do this at your own risk Cause Sort of messes with Windows internals a bit There are certain bugs Where they got locked out From their session And they had to reboot their computer And lose all their work So Do be careful But I have tried this It does work I haven't run into problems Although I don't use it much Basically I use it When I was setting up my laptop And I wanted to use my desktop at home So I just RDP Into my laptop And set up While using my desktop Like mouse and keyboard More convenient What's that song Okay So it's already 4 o'clock So I'm just going to continue If you have to leave Please go ahead I still have a lot to cover To cover Ya Okay, let's move on So this brings us To the Debugging part I think this part Will go slightly faster Well, maybe not Let's just jump into it So Okay How many of you have used GDB? Cool So So GDB is a command line debugger So what a debugger does Basically let's you Like step through a program You know Line by line Or instruction by instruction And see what is going on At each stage So for example If you have a program And something is going on Something is going wrong Then you can set You can set a breakpoint At the part that is going wrong Then That means your program Will stop running Or pause running at that point And then you will And then you can inspect What's going on So you can look at variables Like check Is this variable having The value that you expected to have You know And things like that You can Basically It's just for you to inspect The state of a program Because that's all a program It's a state And code Operating on a state So you can just Pause a program at a particular line And then say Okay Check Is this Then you can like Print certain expressions You can print a value For a variable You can look at a pointer And so on And check if everything Is it Is the variable Having the value That you expect And if not Then you can Try and figure out why And so basically That's debugging So There are a lot of There are a list of Common commands here I think it's easier If we just try it out So if you could just SSH to the Server Right And we'll walk through this Together So Another list of commands So let me just Briefly mention So this step Means go online Just continue One line In source code Step instruction Is basically Step one machine Instruction So if you If you know like MIPS Or X86 It's just stepping one instruction Next At next instruction Slightly different So it's Similar to step But If you have a function call It will step across The function call Instead of like Following The Code inside the function As well So that's That's useful For example That function is correct And you You don't care about it And you just want to Inspect Stay in this function And then there's finish Which is just run All the way until the end Of this function Continue is like Once you're done And you just Once you're done inspecting And you just want to continue Running All the way Until you hit The next Break point And then Then there's one more thing That I think Not many people know about Which is reverse debugging So What reverse debugging Is basically All this You can Go backwards In the program's execution So After you So what you need to do Is you can just say Record And you start recording The program's execution Then once you break You can just You can step backwards By just using the reverse Commands So I think it will Make more sense When we look at an example So I have an example program And it's I think it's obviously Wrong Because you see Access 0 And then you're accessing Now pointer So but Just for the sake of Trying GDPL That's So I have the example In test.c So you can just Copy the example And try it out Or you can write Your own program And debug it So I'm just going to compile Test.c So dash g Just generate debugging information So that the debugger Can show us Like It can show us Where each variable And things like that Dash old test That means I'll output Executable to test And then My source file So you can run this On the server By the way And I've installed All the tools That you need So I've compiled it And now let's run test And see what happens So segmentation fault Too bad I mean segmentation fault Means that Access memory That it's not supposed to access So in this case We're accessing Essentially a now pointer So that's bad Okay I'm just going to Move on to the example So now let's Let's see how we debug this Or Ya So we just run Gdb test Right And Gdb will load The program Then we can press R Which stands for run So you can just Try help Do the full name Of the command Ya So I'm just going to Use a shorthand Which is R So you run the program And then You will Reach the error So if you reach A segmentation fault At this Reach a segmentation fault At this line Right Then Okay So what we're going to do now We can show a BT BT just basically Shows a stack trace So which Or functions That have been called All the way from the top So it shows So this basically shows That Or we were First in main Then main called access Right Main calls access And then That's where the error happened So that's what a back trace Or stack trace is And then Okay So now We see the error Happened at line 4 So let's set a breakpoint At line 4 So this means That it will stop The program Or it's run Okay Then let's run the program again And now we stop Before the error happens And Actually here It already tells you The function arguments Right But For the sake of example Let's just print out The function argument So let's say I want to see What's What's array pointing to Or it's pointing to now Right And let's say What index is Okay index is 1 And then I can also Do something like What's array index Oh I cannot access the memory there Right So actually This is why My program fail Because It's trying to access Memory address 4 But I cannot do that Okay Now Let's try this again So I'm just going to run GDP again But now instead of typing R I'm going to type start So what start does It will run the program All the way to the first Line of code in main Like just before that line So that you can do Like set up some things Before you actually run the program So we have stopped at main And now I'm going to turn on recording I'm going to press C To continue the program And then it will run All the way to my To where the error happens So now what I'm going to do Is I'm going to go backwards Okay backwards 1 line Is still there Oh Now we Backwards again is Out to main Right And we can go We can go further All the way to the top And yeah Now we're back at the start And you can like Continue and run again And then go backwards And so one more thing About GDP Is that if you just Press enter It will repeat the previous Command So we can just press continue And yeah So Um Why would you use reverse debugging Instead of Forward debugging Well it just comes in useful When sometimes You can't figure out Um Like for example Your error happens Only when certain conditions are met Uh When you execute A certain line But if you just set a breakpoint On that line Then You Um You will get a lot You will break a lot of times Even though Those cases are not the problem And so you might Use something called A conditional breakpoint Right But sometimes Like I say You can't figure out What the condition is Then you can just Turn on recording And let it run Until the program Runs into a problem And then after that From there you Step backwards And figure out What actually went wrong It's quite useful Let's move on From GDP Anyone still trying Um Anyway All of this will be available online So You can always experiment More Okay, one caveat About Reverse debugging Of course it's like Um If you have to If you do reverse debugging That means It has to record Every single step Your program makes So it can be It can slow down Your program a lot Especially if it's A complicated program Or big program And you will use a lot Memory to store Every single Like change in state Okay, let's move on To S-Trace So what S-Trace Does is It basically just shows you The operations That the program is making Like the CIS calls The program is making A CIS calls basically A call that The program makes To the operating system So You will learn more About it if you take Your OS calls Way out of scope Of this talk But I'm introducing the tool S-Trace So you have an idea Of what it does So let's exit GDB And Let's use this Other example program So I have I already have it compiled So I'm just going to S-Trace So once you have This program Basically it's just hallow world So I'll just show you That it does It paints hallow world And now if I S-Trace There's a lot of stuff here Right So what S-Trace does Is basically It will list every single CIS call that Program does So there's a lot Of CIS calls going on But this is all Like loading the program And so on And basically Our program Only starts here When it's writing Hallow world To standard output Ya So It's a I can't explain The output of this But if you want to know What a particular For example What does BRK Do You can always type Man to BRK So tool stands for Like When you type man Man is the command To pull up manual pages In Linux So There are different manual pages But Man to in particular Is the one for Linux Specific things So we can look at Man to BRK And BRK So this is something to do With allocating memory Or We can look at what is right So right Is Writing something to a file descriptor So on Ya So You can use S-Trace To figure out Maybe something Is going wrong Like it's opening a file But maybe Or maybe your program Is not loading And then You want to figure out why You can use S-Trace And maybe see That the file Is trying to open a file But it can't find a file Or it's not Like You get permission denied Or something like that Okey Then there's also L-Trace So S-Trace traces system calls L-Trace traces Library calls Library calls Meaning like Library calls Meaning things like calls to printf Etc. Those are library calls So those library functions Will Will make sys calls To actually do the things So if you do L-Trace And we see that Okey It just calls Ya So that's all it does So it's again quite useful Like you can see Exactly what a program is doing And You know Maybe it's not doing Something you want it to do And so on Then you can Figure out from there Okey And if you're using Windows Then there's this thing Called Procmon Which It's a We'll also list down Like what a program is doing And You know Like it's opening a file Or it's closing a file Open a file And so on Okey Windows calls it createfile But basically it's just It's just opening a file I've linked to it here Okey Time So what time does Essentially it just Tells you how long a program takes to run So if I time hello Ya it just takes like No time at all Sorry I'm on the wrong screen If I time hello Then basically taking no time And so on Ya So The output of time is basically Like real Real means the actual time that has taken Like clock time Like real time User is like The amount of CPU time It has spent in user space And system is like The amount of time that has spent By the operating The OS in doing work For that you have requested So if you're like If you need benchmark something Or like figure out How long your algorithm takes to run You can use time Perf So This one goes quite deep into Like Like the performance Thing so like Ya you see things like It will count for you like the Page faults Number of instructions And so on Brunch misses So if you're really optimising a programme Like when you're writing a game For example you will use a tool like this That tells you like Page faults Brunches So This out of scope again But I'll just explain what Like page fault Means that Your programme had to access Something from memory Right Instead of from the CPU cache That to go out to memory and access it So that will slow it down a bit Dan branch is like We have an if An if else So an if will be a branch Most of the time And then a branch miss is basically when like Because your CPU Modern CPU nowadays will predict Brunches To try and speed up a bit So because if it predicts correctly Then Like Instead of waiting for the result Of the branch or computation It will just go ahead first And if it turns out to be wrong That's called a branch miss Or prediction failure Wrong prediction Then it has to undo So Normally when you're writing a programme You And you want it to be You're optimising for speed Then you want to reduce page faults And you reduce Brunches And branch misses of course Ya So It's just to measure statistics Hey progfs So progfs is something that will To tell you about So progfs is a It's a line-up thing That tells you Information about processes And the kernel So there are some useful files in Prog that May come in useful la One day Like for example You have CPU info You'll tell you about The CPUs in your system Or you can actually use LS CPU For that la It's the same actually You can look at the kernel command line If you need it This is basically what the kernel Was booted with Line-ups kernel This is just some information available And there's also like a kernel Configuration available In progfs usually But there's some The most of the information in progfs Is about the Processes running in your system For example So if you want to So what PID stands for is Process ID So Process ID Is just a number Identifying each process la And You can like use a You can go to Progself Which is a special folder Just for the current process Okay And in progself You can look at like For example What command line Was used to run the program So like If I just cat Ya so Oh my program was just run as bash And so on Or you can like You can look at The processes Current directory Like where is it So Since I am looking at myself right And the current directory is actually In like its own progfs directory You can look at the Like where is the executable Of the program So The current program is bash So I am looking at Well my program is bash la Then you can also look at Like what files Does the program have open So Ya So my bash has Is open the pseudo terminal So pseudo terminal is basically Like this screen la So ya I mean it's my shell So it's opening this So you can look at Other processes For example like I don't know Like one And then you can Let's look at what Files this has open So it has open a lot of Sockets And def now And it has open def key message Ya So this is just for you to Also to inspect What a program is doing Or what it has open How the program was run So for example if you use Another program like So this program was run as Or in it And Where is the executable You can just check It's actually this Program But Normally Right We wouldn't use We wouldn't Like look at this information Directly So instead we use tools Like top Or PS Which will present it In a more Convenient format Let's just look at top So I'll cover top In a Further slide later on But basically top looks Like this And you can just look At the processes running So You see just now We're looking at pit one Which was system D So ya System D So I'll cover top A bit more In detail in a later slide So let's just move on first Okay So let's talk a bit About blogging So Like When you are looking at a system That is going wrong Right Then Like you might want to figure out Like what Like why is a system Going wrong Or what's broken And Like A lot of times The first thing you do When something is not working Is just look at the system log I might give you some clues As to like You know what What exactly happened Like it might have spit out Some error message To a log And so on So So there are a few commands On line-ups To look at the system log So you can use Like a D-message Right D-message will tell you The kernel log So for example Just now my program Was crashing Oh Someone tried Running the program on Ya So just now the program That you all run So that will also put An entry in the kernel log Is it set fault at Somewhere here And so on And Ya So this is like Then There's also And this number here Is like the Seconds from boot So when the system Was first started Ya So this here Is just a boot log And then after that Like You know programs They're running Then you can also look At journal CTL So I think On line-up systems nowadays Run on system D So system D systems All will use this This thing called System D journal D Which is basically To save the logs Of all the logs Of a system together And you can use Journal CTL to view it So what I Usually like to do Is use The B flag Of course I only Want to look at The current boot Like from When I last turn On the system All the way Of course journal CTL Or logs forever So if your system Is quite old Then you have a lot Of logs to look through So you just Look at the current boot And maybe I'll look at the Okay I'll jump Okay The thing about B It will take It takes an argument also But if you leave Off the argument Then it's the current boot But you can Like look at The previous boot And so on But if you just Want to So if you want To specify Another option You have to do it Which means I want to jump to the end Of the log At the current boot So then you can look at All the things That have been happening All the things That have been happening On the system So like Oh This system This thing crashed Somebody logged in Another person logged in Another person logged in And so on Oh it's in So all the All the Like logs of the current boot Are in run Ya system So it's run It's in run systemd journal Then Once they are persisted They go into Valog Journal So run is actually In memory file system And then Once in a while JournalD will flush everything Or just save everything To your hard drive So When it's When it's running It's just in run systemd journal Then it gets Flushed into Valog journal It's safe in a binary format So some people don't like it Because it's not You have to use journal CTL To read it Instead of like In the past Where everything was plain text Then you could just use Any tool and open it up So ya There's a lot of things in a So for example sometimes Like My network connection Will randomly drop And then I will be like Okay what's happening The first thing I'll do Is like I'll run up Journal CTL And check the logs Because Like network connection My network manager will Tell When it's doing stuff It will output into the log Like when the network When my connection drops And so on Then it will say Or connection drop And then when it's trying To get a new IP It will Basically everything goes in the log So I know exactly What is going on And why my network will drop And in the past My laptop Like this laptop Used to have issues With like USB 3 What do you call that Internet dongles So Like the driver will start airing out So whenever that happens I will know Of course I will just look at The kernel log So Journal CTL You can use dash K And it will just Output the kernel log So it's actually the same As the D-message So I'll just use KB And then like I'll just show me Like It will show me Right When the When the driver starts to error It will just show me It will just show me It will just show me A bunch of USB errors And then I know Okay I just need to plug out The The download and plug it back in I didn't manage to fix it Okay So if you're So Some programs Don't use the system log So they output To their own log files And those files Will be in the log And those files Will be in Generally They will be in VAR log So you can see here Like Pacman Which is the Arp package manager It has its own log here And like There's also like There's also other logs Here like last log And B10 These are like login logs So you can actually Look at them using last So When the ish user Last login And so on And one useful tool Is to use Tail dash F So if you ever need to So let me just I'm going to tail this test file And now if I I'm going to Append To this So you'll see it appears And Oh Okay I need to Okay I need to append it actually So the difference between one arrow One arrow will just Overwrite the file with This content If you use two arrows Then it will append To that File So every time New content appears in a file It will just show immediately So you can use this To follow a log file As you know More stuff is added in Ya Or with journal With journal CTL You can use dash F With whatever it is So like Ya For journal CTL So now I'm following The system log And if I log out Then you Upload some stuff Okay So if you're on Windows Of course There's a log too Although I would say the Windows log is much More cumbersome to read Like look at this And there's a lot of Noise in it Like I don't Windows has a lot of background Things that are running I honestly Don't like it But When Ya there are still Important things That are going in there Like if you're If you're a kernel Of you If your computer BSO did You will Output Entry into the log So sometimes you can Go and look at there You might have a hint Of what went wrong For example If your graphics driver crashed Which is a very common thing In Windows Right Then There will be an entry there And you can Then you will know That your graphics driver crashed That's why your computer Rebooted Or BSOD BSOD stands for Blue Screen of Death Which by the way They are sort of Considering adding To line-ups Like Instead of having A random crash dump They're going to add A nice screen Which I don't know If it will be blue Like it Or they're considering I'm not sure What people think about it Okay Okay So just now I mentioned top So let's look at top So these are two tools One of them is H top And the other one is One is H top And one is top They are both Sort of Perform the same functionality They just have A different interface So what I Prefer to use top I guess just because top Is usually installed More often than H top Right And so Some of the tools And basically top You just You just type top You open it up And then you can like Just press this There are a lot of keys But you can press help And then it will tell you Exactly all the commands But some of the common Things I use are like V So if you press V It will go into 3 mode So what this means is like You can see Like which process started So like system D Is like the parent Started everything Then it started this stuff And then we have like A few SSH servers running Or a lot of SSH servers running And so on Okay, it gets quite slow But ya So you can see For example Sometimes if your Computer is suddenly very slow And maybe you want to figure out Like what process Is taking up all your CPU time Or maybe you want to look at Like Is Firefox eating up Or is Chrome eating up All my system memory Then you go there And look at your Percent memory column And so on Okay, you can press F And then from here You can like choose So you just press space And then you can like Turn on or off certain things So if you don't care about Like a CPU time Or you don't care about Nice value or priority Then you can just do that Then when you're done You just press escape And ya So you see Some of the columns Are missing now I turn it off You can like Can I Turn on You can press Z To turn on colour Which I use it In this mode personally You can press C To change it To like command line So if you want to see What command line What the command line Instead of the Just the name Right And finally you can use The You can use this Left or right arrow To change the salt So if you want to Salt by pit For example Ya So now I'm salt by pit Then you can like Change To salt by username Am I actually salt by username? I can't see my salt column Or now I'm salt by memory usage By CPU usage And so on So now I'm salt by username And Ya Ya And So H top Is actually quite similar It just has A slightly different interface Which might be More intuitive I guess And then you can like You just press the keys And then you will let you do like You just use arrow keys And then the function keys To do stuff So Just Pick a poison Oh and one more thing About top is that Once you configure it So for example I like it like this So once you are done Configuring it You can press W No sorry shift W If you press shift W You will just save The This configuration So The next time you open top It will be This way la So if you are on If you are windows right Then you will just Use task manager I guess So if you are windows Then Well Windows you can just Use task manager Like That That exists Personally I prefer this tool Called process hacker It shows you More details And it's more powerful It's similar to top Although Because it's called process hacker It actually can Do stuff like Write the process memory And Look at You know A lot of things It's quite crazy I Like You see here I can like I can right click this And like Free the memory Which Okay I won't do that Because it will probably crash the process But So process hacker It's sort of like It does everything That all these commands That I'm going to introduce Will do So This sort of illustrates Like Small difference Like Windows and line up So Windows Windows sort of Has one tool to do many things Line up Or the unique philosophy As they like to call it Is to have Small tools that do Simple things But they do it well Yup But You know If you prefer a graphical interface Then Ya You have this When I'm on windows I just use this In the past When I worked on windows Primarily And you can install it And make it replace Your task manager So By the way If your windows Control shift escape Opens task manager Directly And quite useful In case you need to kill something Okay So let's look at LSOF Quickly Okay So what LSOF does is You can just list If you just type in LSOF It will give you a bunch of files It will give you a lot of things Basically it's just listing Every single thing That is opened by Every single program Or I can't even stop it It's lagging Okay But Let's say you want to See what is Well If you just want to see What is opening Like a certain file Then you just type LSOF Of that file So let's say I just want to look at this file The current directory Then I see Okay Bash is using This directory And LSOF LSOF LSOF itself Is using this current directory And so on Or if you want to list Like Let me use Okay Let's If I want to find out what Files are opened by Pit 1 Then I can just look at this Okay it's opening These files It's opening the journal And so on Okay Then there's also There's also this Tool called Fuser Fuser File user So it's They are both similar tools But I think Fuser Is slightly more commonly installed But you can use Whatever you like So Fuser just works In the same way Like you can just Figure out You can just type This And then you'll say What is Using a Particular file Yeah So this This is the pit PID So Fuser The output Is slightly easier To use in a script If you're using a script This Ya And So if you want More verbose output Then you can do Like this Or like The dash V So it lists Like Okay So this directory Is being used by bash Ya So And if we go to Windows If you need to Find out If you need to Find out what file Is being used by If you need to Find out what file Is being used by a process You can just Always Like Okay let's use a random Like Let's see pageant So Pageant is being used by Oh Rather Pageant is using You just go down to handles And then you can see All the files That it has open And if you want To be evil You can like Let's close this file Oops Ya What Like let's say Okay Let me just create a new file And Okay I'm going to I'm going to create a file I'm going to save it Now I want to try To delete a file Okay no pad It doesn't lock the file anymore But you know In Windows sometimes Like you want to Delete a file But you cannot Because something is using it So what you can do Is using process hacker You just go You just go to Find handles And then you key in the file Just key in the file name And then you can just click find And then you Like figure out what Like for example I want to figure out What's using pageant.exe Then we can just Key that in And then You'll tell me everything That is using Pageant.exe Like let's say I want to delete I want to delete this more But I can't cause it's open Ya So sometimes Windows will tell you What file is open in And sometimes it won't So when it doesn't Then you can use A process hacker to like Figure out What file is open It's the same as LSWF or Fuzer Okay Now we have LSBlock and DF So LSBlock is basically like It lists you the Disks on your system So on this system I only have one disk And it's two partitions Right And then if I want to Look at the free space on the If I look at what free space The system has Then I use DF Ya So this just Tell me what Like all the file systems I have open And how much free space There is So this dash H Means to output In a Human readable format So size is like How much Like the Like how you say Like the total size Of the system Use is How much space is used How much is available And the percentage And where this File system is located So Like VDA1 is located on Slash Means it's a root la And like I have other file systems Mounted on these directories So in Windows It will be drive letters In Unix We have a unified directory Means there's no drive letter But everything is Under one unified hierarchy And things are mounted In Under folders Under the unified Hierarchy Actually in Windows You can also Mount drives under folders Also Which I will show Using Dismanagement So if you go to Dismanagement So if you use Windows a lot Then there's one shortcut That you should know Which is the Windows key and X Then opens up This menu Which has Quite some useful things Like if you need Command prompt Or you know Then we can just go to Dismanagement to see Like the disks And if you need to Like Change drive So this also Let's you Other than looking You can also modify stuff But I won't go into that And you can also If you ever need to Mount a drive under Specific folder Then you can do that also It's not just Drive letters in Windows Then We have DU So DU Is basically a tool to Like summarize your disks Like how much What's the size Taken up by the files In the directory So if I just do like Okay then I know that Oh okay Like my ATC Is 6.5 megabytes My boot is 56 megabytes and so on So what this Means is DU is just Disk usage I guess DU Dash H Means Human readable Output Okay Why Why does this flex Because if you don't do it Then You'll just report Number of bytes Which is Not very friendly For humans So that's why you use Dash H So Then Dash D1 Means just summarize Up to 1 directory Level So if I do Dash HD2 Then you'll just Go to 2 directory levels Instead And so on DUHS Then you'll summarize Just Wifi specify So this Helps you You can use this to like Let's say you want to Delete You need to free up space on your disk Then you can Use DU to like Find out where Your big files are And things like that Or which Directions have The bigger files There's also Tools like find To If you want to Just find big files Ya Okay and on Windows On Windows You have this thing Called Windows Start So what Windows Start Let's you do is You'll just Windows Start Basically analyzes Your whole Like All the folders And just tells you What How big is each folder And so on So if you ever Need to free up space On your disk Then you can just Use this And find out Where Are the big files In your system You can delete Those that you don't need There's also a graphical one On line-ups called Believe Disk Analyzer Ya so on line-ups If you want a graphical Disk usage Disk usage analyzer You can It's called Disk usage analyzer Um Actually the code name is Like Babab Ya It's basically equivalent to this Ya so now A big bubble map of like So you can just From a glance You can see which files are big So this is like Oh This is a recovery environment And this is like a page file And so on And you can like zoom in to like Normally you just look into Like your own user directory Like Let's say downloads Then you can see like Oh okay Um I have You know A few megabytes here And Maybe I want to delete this Okay D-Stab Just close this So D-Stab is basically Something that just outputs System statistics on the go Like Ya So you see that This is basically telling me Like every few seconds You update my CPU usage And my Like how much my disk Being used How much network transfer I'm doing Um How much information is going in And out of page files And I think this is the number of Interrupts So On um Windows You have multiple tools Actually that you can use Um I think built-in task manager Already has a resource monitor But You know You can have You can like look at this You have nice graphs Cost is graphical Okay Um SS The funny thing is All of these tools I'm mentioning Is basically built in It's all in one tool In windows Which is process hacker So I don't know If that is a good thing Or bad thing to you Um I suppose it's convenient But You can't really If you have to automate things Then you can't really Like use process hacker In a script for example So what is SS? SSSU view network connections So I can like View what Is being Like where people are What applications are connecting To what and so on So for example Let's just look at Um All the TCP connections So we have a bunch Of SSH connections From NUS network I guess That makes sense Um Ya So we see these flags Just um These flags here Just They you select What Which connections You want to look at And so on You can just turn off You can use SS And then you view everything But Usually there's a lot of things Um But sometimes you want to Let's say A You want to view Like open ports Or what is listening Um What your computer Is Listening to So you can use SSL for that Or normally we use SSLT So We look at the open TCP ports And so that So you see that Oh I'm listening on um Port 770 Oh ok That's my other That was the thing I have open Ya I'm listening on SSH And Ya that's all I'm listening on Local Ya I'm listening on localhost Um Port 53 Which is domain Ya So um What this address Means by the way If you have 0000 Or you have um Like This empty Like colon colon Which is IPv6 Equivalent of 0000 That means it's listening On all addresses Then you have like Colour colon 1 Or 127.0.0.0.0 Or something That means it's only Listening on the local computer So Um When this might come in useful Is for example Like right now if I A So there's something listening on Port 770 here And if I try and do If I try and listen in If I try and open Something else on Port 770 It will tell me an error So Like If I Maybe I want to find out What else is listening on Port 770 And then like Maybe kill it Of course You know Of course you can only have One process listening To a particular port So Like you Sometimes you're like Why is there something else Listening on a port? Of course I didn't start it And so you can use This tool to find out Or you can The other Use of this is to Like find out What your programs Are connecting to Oh And one more flag You can use is L P So you combine this With LT Then you just tell you Which program Is listening to this So system D Resolve is listening To my local Port 53 My SSH server Is listening to Well the SSH port And one more flag Actually Which is Port N So if you put N Then it won't It will just show the Port number instead of the name So that might come in useful Sometimes 6969 Hmm Ya So again I keep going to Process Hacker Because really on Windows You have it all in one tool So in Process Hacker You have this network tab And you can just see In Process Hacker You can just see Like you know What program is connecting Or listening to what And so on Alright We are on to the last segment Cut Alright How to make the presentation slides I use review.js Ya Okay So I guess Okay I think a good point Good thing is that we Manage to finish The SSH part And This debugging part I think those are The ones that require More explanation So this network Debugging part All the information All the slides are there If you have any questions Please do look at it And Ya, I'm sorry For taking so long today Sorry for the technical difficulties earlier We will email you The video recording If you want to look at it The slides will be up Like forever So Ya Unfortunately I will Have to take down the server Like sometime later today Because It's not free I'm using My digital ocean credit For it But ya So If you have any questions Please feel free to Email us E-mail to