Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
はじめてのしくじり /fjordbootcamp-211009
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
haruna tsujita
October 08, 2021
Programming
1.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
はじめてのしくじり /fjordbootcamp-211009
haruna tsujita
October 08, 2021
Transcript
59 slides
͡Ίͯͷ͘͠͡Γ SSHଓʹखΛম͍ͨ FJORD BOOT CAMP ॳΊͯͷLTձɹvol.9 napple29ɹΔͳ
ࣗݾհ • napple29 Δͳ • ग़ɿ౦ژ • લ৬ޢࢣɹେֶපӃͷखज़ࣨ / ೝՄอҭԂͷޢࢣ
• 2021.4~ ϑΟϤϧυϒʔτΩϟϯϓͰษڧத • ݱࡏͷϓϥΫςΟεRails
͜ͷLTʹ͍ͭͯ ॳ৺Λࢥ͍ग़͢ܥLT
͜ͷLTʹ͍ͭͯ ॳ৺Λࢥ͍ग़͢ܥLT `ೖձͯ͠12ʙ15ͷ̐ؒΛSSHଓʹඅͨ͜͠ͱ’Λ͖͔͚ͬʹ ࣌ͷࢲֶ͕Μͩ͜ͱΛ͓͠͠·͢
SSHʹ͍ͭͯ ͪΐͬͱͨ͠ࢲ͕ૹΔ
SSHͱʁ • SSHɿSecure SHell • ωοτϫʔΫΛհͯ͠ผͷίϯϐϡʔλʔʹϩάΠϯ͠ɺ ૢ࡞͢ΔͨΊͷιϑτΣΞ
SSHଓͷ͘͠Έ ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ
ൿີ伴 ެ։伴 SSHଓͷ͘͠Έ ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ
ެ։伴 ൿີ伴 ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ SSHଓͷ͘͠Έ
ެ։伴 ϩάΠϯ͍ͨ͠ ൿີ伴 ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ SSHଓͷ͘͠Έ
ൿີ伴 ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ 4283745 SSHଓͷ͘͠Έ ཚ
ެ։伴
ൿີ伴 ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ SSHଓͷ͘͠Έ ฏจ 4283745
ཚ ެ։伴
ൿີ伴 ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ L%*#$!T SSHଓͷ͘͠Έ ҉߸จ
4283745 ཚ ެ։伴
ൿີ伴 ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ SSHଓͷ͘͠Έ 4283745 ެ։伴
ཚ L%*#$!T ҉߸จ
ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ L%*#$!T ൿີ伴 SSHଓͷ͘͠Έ 4283745
ެ։伴 ཚ ҉߸จ
ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ L%*#$!T SSHଓͷ͘͠Έ 4283745 ެ։伴
4283745 ൿີ伴 ཚ ཚ ҉߸จ
ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ L%*#$!T SSHଓͷ͘͠Έ ൿີ伴 {ʓʓ:**}
ϋογϡ {ʓʓ:**} ϋογϡ ެ։伴 ҉߸จ
ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ L%*#$!T SSHଓͷ͘͠Έ ൿີ伴 ҉߸จ
{ʓʓ:**} ϋογϡ {ʓʓ:**} ϋογϡ ެ։伴
ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ L%*#$!T SSHଓͷ͘͠Έ ൿີ伴 {ʓʓ:**}
ϋογϡ {ʓʓ:**} ϋογϡ ެ։伴
҉߸Խ͞Εͨ௨৴ ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ SSHଓͷ͘͠Έ
ͱɺࠓ͜ͷ͘Β͍આ໌Ͱ͖ΔΑ͏ʹͳΓ·͕ͨ͠…
ೖձͨͯ͠ͷΘͨ͠ ԿΛݴ͍ͬͯΔ͔ શ͘Θ͔Βͳ͍
ຓʢΤϯδχΞʣʹΘ͔ΒΜͱݴ͍·͘Δ
ೖձͨͯ͠ͷΘͨ͠ શ͕ͯॳΊͯ
ೖձͨͯ͠ͷΘͨ͠ શ͕ͯॳΊͯ શ͕ͯΑ͘Θ͔Βͳ͍
ೖձͨͯ͠ͷΘͨ͠ શ͕ͯॳΊͯ શ͕ͯΑ͘Θ͔Βͳ͍ શ͕ͯෆ҆
ೖձͨͯ͠ͷΘͨ͠ શ͕ͯॳΊͯ શ͕ͯΑ͘Θ͔Βͳ͍ શ͕ͯෆ҆ པΔਓ͕͍ͳ͍
SSHΓӽ͑ΒΕΔؾ͕͠ͳ͍… ͦͯ͠ɺͱʹ͔͘Ή
࣭Λ͏·͘Ͱ͖ͳ͍
• wakaranνϟϯωϧͰฉ͍ͯΈΔ ࣭ͯ͠ΈΔ͕…
• wakaranνϟϯωϧͰฉ͍ͯΈΔ • ͕ࣝͳͯࣗ͘ͷঢ়گΛ͏·͘આ໌Ͱ͖ͳ͍ ࣭ͯ͠ΈΔ͕…
• wakaranνϟϯωϧͰฉ͍ͯΈΔ • ͕ࣝͳͯࣗ͘ͷঢ়گΛ͏·͘આ໌Ͱ͖ͳ͍ • ฉ͖͍ͨ͜ͱͨ͘͞Μ͋ΔͷʹɺͦΕҎ্ฉ͚ͳ͍ ࣭ͯ͠ΈΔ͕…
• wakaranνϟϯωϧͰฉ͍ͯΈΔ • ͕ࣝͳͯࣗ͘ͷঢ়گΛ͏·͘આ໌Ͱ͖ͳ͍ • ฉ͖͍ͨ͜ͱͨ͘͞Μ͋ΔͷʹɺͦΕҎ্ฉ͚ͳ͍ • ࣭λΠϜͰฉ͖͍͕ͨɺ༐ؾ͕ͳͯ͘ฉ͚ͳ͍… ࣭ͯ͠ΈΔ͕…
༻ޠΛཧղͤͣʹϓϥΫςΟεʹऔΓΉ
༻ޠΛཧղͤͣʹϓϥΫςΟεʹऔΓΉ EX. $ ΛҰൠϢʔβʔͩͱ͔͍ͬͯͳ͔ͬͨ
ൿີ伴 ެ։伴 $ ssh-keygen -t rsa ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ
ʢ͘͞ΒVPSͳͲʣ ྫɹ$ ΛҰൠϢʔβʔͩͱ͔͍ͬͯͳ͔ͬͨ
ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ ྫɹ$ϚʔΫ͕ҰൠϢʔβʔͩͱ͔͍ͬͯͳ͔ͬͨ 1.ઃఆϑΝΠϧΛૢ࡞ $ vi
/etc/ssh/sshd_config
2.ެ։伴Λஔ͘ॴΛ༻ҙ $ mkdir .ssh ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ
ʢ͘͞ΒVPSͳͲʣ ྫɹ$ϚʔΫ͕ҰൠϢʔβʔͩͱ͔͍ͬͯͳ͔ͬͨ 1.ઃఆϑΝΠϧΛૢ࡞ $ vi /etc/ssh/sshd_config
ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ ಉ͡ϢʔβʔͰૢ࡞͠ͳͯ͘ͳΒͳ͍ ྫɹ$ϚʔΫ͕ҰൠϢʔβʔͩͱ͔͍ͬͯͳ͔ͬͨ
rootͰߦ͍ͬͯͨ ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ ʢ͘͞ΒVPSͳͲʣ ྫɹ$ϚʔΫ͕ҰൠϢʔβʔͩͱ͔͍ͬͯͳ͔ͬͨ
permission denied. ެ ։ 伴 ΫϥΠΞϯτଆ ʢࣗʣ αʔόʔଆ
ʢ͘͞ΒVPSͳͲʣ ൿີ伴 ྫɹ$ϚʔΫ͕ҰൠϢʔβʔͩͱ͔͍ͬͯͳ͔ͬͨ
’ࢲҰੜSSHଓͰ͖ͳ͍͔’
• ̍ͭΘ͔Δͱɺ·ͨ̍ͭΘ͔Βͳ͍͜ͱͱग़ձ͏ ࣌ɺ͘͢͝য͍ͬͯͨ
• ̍ͭΘ͔Δͱɺ·ͨ̍ͭΘ͔Βͳ͍͜ͱͱग़ձ͏ • ૣ͘ଔۀͯ͠ಇ͖͍ͨ ࣌ɺ͘͢͝য͍ͬͯͨ
• ̍ͭΘ͔Δͱɺ·ͨ̍ͭΘ͔Βͳ͍͜ͱͱग़ձ͏ • ૣ͘ଔۀͯ͠ಇ͖͍ͨ • ͏ΤϯδχΞఘΊͯɺޢࢣʹΖ͏͔ͳ… ࣌ɺ͘͢͝য͍ͬͯͨ
• ̍ͭΘ͔Δͱɺ·ͨ̍ͭΘ͔Βͳ͍͜ͱͱग़ձ͏ • ૣ͘ଔۀͯ͠ಇ͖͍ͨ • ͏ΤϯδχΞఘΊͯɺޢࢣʹΖ͏͔ͳ… ࣗͰͲ͏ʹͰ͖ͳ͍ͱޛΓɺQˍAͰ࣭ͯ͠Έͨͱ͜Ζ… ࣌ɺ͘͢͝য͍ͬͯͨ
Ͱղܾ🎉 ɹ
͘͠͡ΓɹʹɹSSHଓʹۤઓ͍ͯ͠Δͱ͖ͷࣗ
• ʲશ͘Θ͔Βͳ͍͜ͱ͕Θ͔ͬͨܦݧʳ͕ࣗ৴ʹͳͬͨ ͘͠͡Γ͔ΒֶΜͩ͜ͱ
• ʲશ͘Θ͔Βͳ͍͜ͱ͕Θ͔ͬͨܦݧʳ͕ࣗ৴ʹͳͬͨ • ࠓͰԿ͔ʹͭ·ͮ͘ͱʮͰSSHͰ͖͔ͨΒେৎʯͱࢥ͑Δ ͘͠͡Γ͔ΒֶΜͩ͜ͱ
• ίϛϡχςΟʹର͢Δ҆৺ײ͕ժੜ͑ͨ ͘͠͡Γ͔ΒֶΜͩ͜ͱ
• ίϛϡχςΟʹର͢Δ҆৺ײ͕ժੜ͑ͨ • ใʹ࿈ɹɹϚʔΫ → ϝϯλʔ͞Μ͕ݟʹདྷͯ͘Ε͍ͯͨ ͘͠͡Γ͔ΒֶΜͩ͜ͱ
• ίϛϡχςΟʹର͢Δ҆৺ײ͕ժੜ͑ͨ • ใʹ࿈ɹɹϚʔΫ → ϝϯλʔ͞Μ͕ݟʹདྷͯ͘Ε͍ͯͨ • ࣮ݟकΒΕ͍ͯΔ͜ͱ ͘͠͡Γ͔ΒֶΜͩ͜ͱ
• ίϛϡχςΟʹର͢Δ҆৺ײ͕ժੜ͑ͨ • ใʹ࿈ɹɹϚʔΫ → ϝϯλʔ͞Μ͕ݟʹདྷͯ͘Ε͍ͯͨ • ࣮ݟकΒΕ͍ͯΔ͜ͱ • ॿ͚ͯΒ͑ΔίϛϡχςΟͩͱ͔ͬͯ҆৺ͨ͠
͘͠͡Γ͔ΒֶΜͩ͜ͱ
• ࠀͰ͖͍ͯͳ͍͜ͱͨ͘͞Μ… ͘͠͡Γ͔ΒֶΜͩ͜ͱ
• ࠀͰ͖͍ͯͳ͍͜ͱͨ͘͞Μ… • ·ͩ·ͩൃల్্ɺઈࢍͰ͖ͳ͍ࣗͱ͖߹͍த ͘͠͡Γ͔ΒֶΜͩ͜ͱ
• ࠀͰ͖͍ͯͳ͍͜ͱͨ͘͞Μ… • ·ͩ·ͩൃల్্ɺઈࢍͰ͖ͳ͍ࣗͱ͖߹͍த • ͘͠͡Δ͔Βͦ͜ɺௐΔɺखΛಈ͔͢ɺֶͿʂ ͘͠͡Γ͔ΒֶΜͩ͜ͱ
• ࠀͰ͖͍ͯͳ͍͜ͱͨ͘͞Μ… • ·ͩ·ͩൃల్্ɺઈࢍͰ͖ͳ͍ࣗͱ͖߹͍த • ͘͠͡Δ͔Βͦ͜ɺௐΔɺखΛಈ͔͢ɺֶͿʂ ͬͯ͘͠͡ԕճΓ͢Δͷɺѱ͘ͳ͍ ͘͠͡Γ͔ΒֶΜͩ͜ͱ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠
More Decks by haruna tsujita
See All by haruna tsujita
Rebuilding Turbo Streams with ruby.wasm and Ruby Sockets
harunatsujita
1
2.4k
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
320
Hotwire or React? ~Reactの録画機能をHotwireに置き換えて得られた知見~ / hotwire_or_react
harunatsujita
11
11k
fbc-graduation-napple
harunatsujita
0
130
Rails Girls 2022 LT
harunatsujita
0
680
Other Decks in Programming
See All in Programming
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
350
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
250
Будущее локальных LLM – Алексей Голобурдин, PythoNN
sobolevn
0
120
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
2
330
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
340
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
640
Seven New Principles of Software Engineering
yegor256
0
490
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
150
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
130
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
240
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
110
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
340
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
690
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
900
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
980
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
310
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
530
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to build a perfect <img>
jonoalderson
1
6.2k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
610
Utilizing Notion as your number one productivity tool
mfonobong
4
640