...
Log in with your Metropolia credentials at https://sshauth.metropolia.fi.
Note title Internal Network or VPN Access to https://sshauth.metropolia.fi requires Metropolia's internal network or VPN service.
Instructions for using the VPN service are available here: VPN Connection via GlobalProtect Service.- Select Accept.
- Open the code for two-factor authentication from the message sent to your Metropolia email.
- Enter the code in the form.
- Select Verify 2-factory code.
- Select Create New SSH-key pair.
- Select Download current SSH-private key.
Save the key to your desired folder on your computer.
...
Create a new key pair according to the Generating SSH Key Generation Keys instructions.
Miten lopetan avainparin käytön kokonaan ja estän kirjautumiset?
How do I completely stop using a key pair and disable logins?
- Log in according to the Generating SSH Keys instructions at Kirjaudu SSH-avainten luonti -ohjeen mukaisesti osoitteessa https://sshauth.metropolia.fi.
- Poista avainpari käytöstä toiminnolla Disable the key pair by using the Delete current ssh keys function.
SSH
...
Login from a Workstation
Info | |||
---|---|---|---|
| |||
Login only works if the key pair status on the site Kirjautuminen toimii vain, jos avainparin tilaksi sivustolla https://sshauth.metropolia.fi on merkitty is marked as SSH-Keys OK. |
SSH
...
Connection from Windows Command Prompt
- Open the Windows Command Prompt.
- Press
- Paina .
- Kirjoita hakukenttään cmdType cmd in the search field.
- Avaa Open the Command Prompt -sovellusapplication.
- Mene avaimen tallennuskansioon.
- Navigate to the folder where the key is stored.
- Change the file permissions to a format accepted by the SSH software by entering the commandsMuuta tiedosto-oikeudet SSH-ohjelmiston hyväksymään muotoon syöttämällä komennot:
icacls <ssh-avaimen tiedoston nimi> key file name> /Inheritance:r
icacls <ssh-avaimen tiedoston nimi> key file name> /Grant:r "%Username%":"(R)" - Kirjaudu palvelimelle syöttämällä komentoLog in to the server by entering the command:
ssh –i <ssh-avaimen tiedoston nimi> <lyhyt Metropolia-käyttäjätunnus>@key file name> <short Metropolia username>@shell.metropolia.fi - Jos SSH-ohjelma antaa ilmoituksenIf the SSH program gives a message:
The authenticity of host 'shell.metropolia.fi (195.148.105.150)' can't be established.
ECDSA key fingerprint is SHA256:JmKwxqzHvpLgmGW6o+PId0GmdalnHMdsG0jDlINUG3c.
Are you sure you want to continue connecting (yes/no/[fingerprint])?- Kirjoita Type yes.
Paina Press Enter-näppäintä.
Warning title Verkkolevyjen tiedosto-oikeudet File Permissions on Network Drives If you have stored the SSH key on a network drive, it is possible that the file permissions do not save correctly with the icacls commands, and the SSH command line software does not create a connection, giving an error message Jos olet tallentanut SSH-avaimen verkkolevylle, on mahdollista, että tiedosto-oikeudet eivät icacls-komennoilla tallennu toivotulla tavalla ja ssh-komentoriviohjelmisto ei suostu luomaan yhteyttä antaen virheilmoituksen "WARNING: UNPROTECTED PRIVATE KEY FILE!". Vaihda tällöin avaimen tallennuspaikka tietokoneesi kovalevylle ja aloita ohjeiden noudattaminen alusta.
SSH-yhteys Windowsin PuTTY-ohjelmistolla
In this case, change the storage location of the key to your computer's hard drive and start following the instructions from the beginning.
SSH Connection Using PuTTY on Windows
- Open the PuTTY Key Generator program.
- Press
- Paina +R.
- Kirjoita tekstikenttään puttygenType puttygen in the text field.
- Klikkaa Click OK.
- Valitse kohta Select Conversions → Import key.
- Valitse tallentamasi yksityinen SSH-avain.
- Select the private SSH key you saved.
- Save the key in PuTTY format to your desired folderTallenna avain PuTTY-muodossa haluamaasi kansioon.
- Muodosta Establish SSH -yhteys PuTTY:llä Connection with PuTTY.
- Open
- Avaa PuTTY
- Paina Press .
- Kirjoita hakukenttään puttyType putty in the search field.
- Klikkaa Click the PuTTY -kuvakettaicon.
- Mene valikkoon Go to the menu Connection → SSH → Auth → Credentials.
- Aseta tallentamasi PuTTY-muotoinen SSH-avaintiedosto kohtaan Set the saved PuTTY format SSH key file in the Private key file for authentication field.
- Täytä Session-kohtaan palvelimen tiedot muodossa <lyhyt Metropolia-käyttäjätunnus>@shellFill in the server details in the Session section in the format <short Metropolia username>@shell.metropolia.fi.
- Tallenna istunto antamalla sille haluamasi nimi kenttään Saved Sessions ja klikkaa Save.
- Save the session by giving it a name in the Saved Sessions field and click Save.
- Log in to the server by clicking Kirjaudu palvelimelle klikkaamalla Open.
- Klikkaa tietoturvavaroitusikkunassa AcceptClick Accept in the security warning window.
- If the connection opens, but no text is printed in the PuTTY window:
- Close
- Sulje PuTTY.
- Käynnistä Restart PuTTY uudestaan.Tuplaklikkaa tallentamaasi
- istuntoaDouble-click the saved session.
SSH
...
Connection from Linux Command Line
- Navigate to the folder where the key is stored.
- Change the file permissions to a format accepted by the SSH software by entering the command
- Mene avaimen tallennuskansioon.
- Muuta tiedosto-oikeudet SSH-ohjelmiston hyväksymään muotoon syöttämällä komento:
chmod 600 <ssh-avaimen tiedoston nimi>key file name> - Kirjaudu palvelimelle syöttämällä komento:
ssh –i <ssh-avaimen tiedoston nimi> <lyhyt Metropolia-käyttäjätunnus>@shellkey file name> <short Metropolia username>@shell.metropolia.fi - Jos SSH-ohjelma antaa ilmoituksenIf the SSH program gives a message:
The authenticity of host 'shell.metropolia.fi (195.148.105.150)' can't be established.
ECDSA key fingerprint is SHA256:JmKwxqzHvpLgmGW6o+PId0GmdalnHMdsG0jDlINUG3c.
Are you sure you want to continue connecting (yes/no/[fingerprint])?- Kirjoita Type yes.
Paina Press Enter-näppäintä.
...
Did You Encounter a Problem?
Include Page | Miten toimin ongelmatilanteessa? | Miten toimin ongelmatilanteessa?|||
---|---|---|---|---|
|
SSH-avainparin luonti ja kirjautuminen Linux-palvelimelle (shell.metropolia.fi)