---
# System prepended metadata

title: 'Kako se spojiti na https://labs.play-with-docker.com/ preko SSH'

---

---
author: Matija Burić
---

### Mrežni i mobilni operacijski sustavi

# Tips & Tricks


## Kako se spojiti na https://labs.play-with-docker.com/ preko SSH

- na stranici https://labs.play-with-docker.com/ odaberite start te se prema potrebi logirajte sa google accountom

![image](https://hackmd.io/_uploads/Sk6CrgKAel.png)

![image](https://hackmd.io/_uploads/r1kdUltRxe.png)

otvara se funkcionalan online terminal ali potrebno je vrijeme privikavanja

![image](https://hackmd.io/_uploads/BJ-2UetRel.png)

- za bolji user experiance preporuča se korištenje SSH konekcije
- potrebno je izgenerirati ključ korištenjem `ssh-keygen -f [putanja_za_snimanje]`

```bash=
C:\>ssh-keygen -f c:\sshkey\sshkey

Generating public/private ed25519 key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in c:\sshkey\sshkey
Your public key has been saved in c:\sshkey\sshkey.pub
The key fingerprint is:
SHA256:7lTKJGkFSd/j6wFga49ivT5zwvsXXF60WmM15vZYrfg nekiuser@DESKTOP-S4AGHC2
The key's randomart image is:
+--[ED25519 256]--+
|     .o.         |
|      .o .    .o.|
|      o o o  .ooo|
|     . = . .. *oo|
|      * S.oo *.=.|
|     + B +o.+ o .|
|    o.o * o. .   |
|   . .=+....  E  |
|     .+Bo..      |
+----[SHA256]-----+



C:\>dir c:\sshkey
 Volume in drive C has no label.
 Volume Serial Number is 6078-D3C3

 Directory of c:\sshkey

24.10.2025.  13:41    <DIR>          .
24.10.2025.  13:41               419 sshkey
24.10.2025.  13:41               105 sshkey.pub
               2 File(s)            524 bytes
               1 Dir(s)  389.894.504.448 bytes free
```


- na stranicama https://labs.play-with-docker.com/ kopirajte ssh link kao što je prikazano na slici


![image](https://hackmd.io/_uploads/Bk99dkYClx.png)


### u terminalu (CMD, PowerShell)


- potrebno je kopirati taj ssh link u terminal ALI između ssh i ip172.... upišite putanju ssh ključa: `-i [putanja_do_ssh_kljuca]`




```bash=
ssh -i c:\sshkey\sshkey ip172-18-0-51-d3tm9qi91nsg008erg6g@direct.labs.play-with-docker.com
Connecting to 40.114.80.134:8022
###############################################################
#                          WARNING!!!!                        #
# This is a sandbox environment. Using personal credentials   #
# is HIGHLY! discouraged. Any consequences of doing so are    #
# completely the user's responsibilites.                      #
#                                                             #
# The PWD team.                                               #
###############################################################
-sh: disown: not found
[node1] (local) root@192.168.0.29 ~
$
[1]+  Done(1)                    (while !docker info 1>&/dev/null; do sleep 1; done; docker network create -d bridge docker_gwbridge 1>&/dev/null)
[node1] (local) root@192.168.0.29 ~
$
```

### korištenjem PuTTY alata

- skinite PuTTy sa stranica https://putty.org/index.html
- kako bi se isti key primjenio i u Putty potrebno je prvo prebaciti ga u format kojeg čita Putty korištenjem PuTTYgen
- pokrenite PuTTYgen

![image](https://hackmd.io/_uploads/Sy7ApJtRex.png)

![image](https://hackmd.io/_uploads/HypGCktRxx.png)

![image](https://hackmd.io/_uploads/ByvIAkK0ll.png)

- za potrebe testiranja nije nužno postavljati passhrase (jedino ako baš želite)

![image](https://hackmd.io/_uploads/SJP3RyYAgg.png)

- pokrenite PuTTY i dodajte ključ pod Connection > SSH > Auth > Credentials

![image](https://hackmd.io/_uploads/H10bygFAeg.png)

- PRIJE nego stisnete **Open** snimite konekciju za ubuduće

![image](https://hackmd.io/_uploads/H1eygeFRee.png)

- sada upišite adresu s stranice *ssh ip172-18-0-51-d3tm9qi...* ALI bez **ssh** i kliknite na **Open**

![image](https://hackmd.io/_uploads/SJnTegKClx.png)





