Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Log in with your Metropolia credentials at https://sshauth.metropolia.fi.

    Note
    titleInternal 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.


  2. Select Accept.

  3. Open the code for two-factor authentication from the message sent to your Metropolia email.
  4. Enter the code in the form.
  5. Select Verify 2-factory code.

  6. Select Create New SSH-key pair.



  7. Select Download current SSH-private key.



  8. 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?

  1. Log in according to the Generating SSH Keys instructions at Kirjaudu SSH-avainten luonti -ohjeen mukaisesti osoitteessa https://sshauth.metropolia.fi.
  2. Poista avainpari käytöstä toiminnolla Disable the key pair by using the Delete current ssh keys function.

SSH

...

Login from a Workstation

Info
titleKirjautuminen ja avainparin statusLogin and Key Pair Status

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


  1. Open the Windows Command Prompt.
    1. Press
    Avaa Windows-komentorivi.
    1. Paina Kuva Windows-näppäimestä.
    2. Kirjoita hakukenttään cmdType cmd in the search field.
    3. Avaa Open the Command Prompt -sovellusapplication.

  2. Mene avaimen tallennuskansioon.
  3. Navigate to the folder where the key is stored.
  4. 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)"

  5. 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

  6. 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])?
    1. Kirjoita Type yes.
    2. Paina Press Enter-näppäintä.

      Warning
      titleVerkkolevyjen tiedosto-oikeudetFile 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

    1. 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

  1. Open the PuTTY Key Generator program.
    1. Press
    Avaa PuTTY Key Generator -ohjelma.
    1. Paina Kuva Windows-näppäimestä+R.
    2. Kirjoita tekstikenttään puttygenType puttygen in the text field.
    3. Klikkaa Click OK.
  2. Valitse kohta Select Conversions → Import key.

  3. Valitse tallentamasi yksityinen SSH-avain.
  4. Select the private SSH key you saved.
  5. Save the key in PuTTY format to your desired folderTallenna avain PuTTY-muodossa haluamaasi kansioon.


  6. Muodosta Establish SSH -yhteys PuTTY:llä Connection with PuTTY.
    1. Open
    2. Avaa PuTTY
      1. Paina Press Kuva Windows-näppäimestä.
      2. Kirjoita hakukenttään puttyType putty in the search field.
      3. Klikkaa Click the PuTTY -kuvakettaicon.

    3. Mene valikkoon Go to the menu Connection → SSH → Auth → Credentials.
    4. Aseta tallentamasi PuTTY-muotoinen SSH-avaintiedosto kohtaan Set the saved PuTTY format SSH key file in the Private key file for authentication field.


    5. 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.
    6. Tallenna istunto antamalla sille haluamasi nimi kenttään Saved Sessions ja klikkaa Save.
    7. Save the session by giving it a name in the Saved Sessions field and click Save.

    8. Log in to the server by clicking Kirjaudu palvelimelle klikkaamalla Open.



    9. Klikkaa tietoturvavaroitusikkunassa AcceptClick Accept in the security warning window.


    10. If the connection opens, but no text is printed in the PuTTY window:
      1. Close
      Jos yhteys aukeaa, mutta PuTTY;n ikkunaan ei tulostu tekstiä:
      1. Sulje PuTTY.
      2. Käynnistä Restart PuTTY uudestaan.Tuplaklikkaa tallentamaasi
      3. istuntoaDouble-click the saved session.

SSH

...

Connection from Linux Command Line

  1. Navigate to the folder where the key is stored.
  2. Change the file permissions to a format accepted by the SSH software by entering the command
  3. Mene avaimen tallennuskansioon.
  4. Muuta tiedosto-oikeudet SSH-ohjelmiston hyväksymään muotoon syöttämällä komento:

    chmod 600 <ssh-avaimen tiedoston nimi>key file name>

  5. 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


  6. 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])?
    1. Kirjoita Type yes.
    2. Paina Press Enter-näppäintä.

...

Did You Encounter a Problem?

Miten toimin ongelmatilanteessa?
Include Page
Miten toimin ongelmatilanteessa?
Did You Encounter a Problem?
Did You Encounter a Problem?


SSH-avainparin luonti ja kirjautuminen Linux-palvelimelle (shell.metropolia.fi)