Using Linux Ubuntu in Yandex Cloud
Remote Access with SSH
For this course, a VM with Linux Ubuntu is available at the public server (Yandex Cloud).
To access the server VM, please follow the steps below:
-
For Windows users: download and install Git. Run Git Bash.
-
Run the
ssh-keygen
command in the console, to generate SSH keys. Specify the passphrase for the keys. The keys will be generated in the following folders.- MacOS:
/Users/andrew/.ssh
(private key -id_rsa
; public key -id_rsa.pub
) - Windows:
/c/Users/andrew/.ssh
(private key -id_rsa
; public key -id_rsa.pub
)
- MacOS:
-
Upload the public SSH key (
id_rsa.pub
) to some Cloud drive (Google, Yandex, Mail, etc.) and add the link to it into this table. -
The admin will take data from the table and will provide you with a login.
-
Once you get your login, you can connect to the server using the following command:
ssh login@ipaddress -p22
where
login
is your login andipaddress
is84.201.145.249
.Input the passphrase for the key to authorize.
More information on the SSH tool is available here. Also, see Wikipedia for details on the SSH protocol.
Copying Files with SCP
Files and entire folders can be copied to and from the server using the scp tool.
- Copying a file to the server:
scp -p22 /Users/andrew/myprog.c login@ipaddress:/home/tatarnikov/
- Copying a folder to the server:
scp -p22 -r /Users/andrew/myfolder/ login@ipaddress:/home/tatarnikov/
- Copying a file from the server:
scp -p22 login@ipaddress:/home/tatarnikov/myprog.c /Users/andrew/
- Copying a folder from the server:
scp -p22 -r login@ipaddress:/home/tatarnikov/myfolder/ /Users/andrew/
Note: specify login
as your login, ipaddress
as 84.201.145.249
,
and use paths valid for your local and remove user account.