An SSH Key allows you to log into your server without needing a password. SSH Keys can be automatically added to servers during the installation process.
Creating an SSH key on Windows
Azure Virtual Machines for Visual Studio Code (Preview) Create and manage Azure Virtual Machines directly from VS Code. Sign up today for your free Azure account and receive 12 months of free popular services, $200 free credit and 25+ always free services.
The simplest way to create SSH key on Windows is to use PuTTYgen.
- Download and run PuTTYgen.
- Click the 'Generate' button.
- For additional security, you can enter a key passphrase. This will be required to use the SSH key, and will prevent someone with access to your key file from using the key.
- Once the key has been generated, click 'Save Private Key'. Make sure you save this somewhere safe, as it is not possible to recover this file if it gets lost
- Select all of the text in the 'Public key for pasting into OpenSSH
authorized_keys
file'. This is what you would need to enter into the control panel to use the SSH key.
Creating an SSH key on Linux
The tools to create and use SSH are standard, and should be present on most Linux distributions. With the following commands, you can generate ssh key.
- Run:
ssh-keygen -t rsa
. For a more secure 4096-bit key, run:ssh-keygen -t rsa -b 4096
- Press enter when asked where you want to save the key (this will use the default location).
- Enter a passphrase for your key.
- Run
cat ~/.ssh/id_rsa.pub
- this will give you the key in the proper format to paste into the control panel. - Make sure you backup the
~/.ssh/id_rsa
file. This cannot be recovered if it is lost.
Need To Generate New Ssh Key Visual Studio Team Services Vsts
Adding an SSH key to your control panel
- Once you're logged in, go to https://my.vultr.com/sshkeys.
- Click 'Add SSH Key'.
- Enter a descriptive name for the key.
- Paste in your SSH public key. This is a long string beginning with 'ssh-rsa'. You should have saved this from when you generated your key.
- Click 'Add SSH Key'.
- Now, when you're deploying servers you will be able to select which SSH keys you want to add to the newly deployed server. Remember to select the keys before the initial server deployment, otherwise you will need to log into the newly created server and add the SSH keys manually.
Limitations
- SSH keys are only available for Linux and FreeBSD. They are not supported for Windows, custom ISOs, nor snapshot restores.
- SSH keys can only be managed from the control panel during deployment. You cannot use the control panel to manage them on an already-installed instance.
Connecting to a server using an SSH key from a Windows client
- Download and run the PuTTY SSH client.
- Type the IP address or Username + IP address (
[email protected]
) of the destination server under the 'Host Name' field on the 'Session' category. - Navigate to the 'Connection -> SSH -> Auth' category (left-hand side).
- Click 'Browse...' near 'Private key file for authentication'. Choose the private key file (ending in
.ppk
) that you generated earlier with PuTTYgen. - Click 'Open' to initiate the connection.
- When finished, end your session by pressing
Ctrl+d
.
Connecting to a server using an SSH key from a Linux client
- Check that your Linux operating system has an SSH client installed (
which ssh
). If a client is not installed, you will need to install one. - Initiate a connection:
ssh -i /path/to/id_rsa [email protected]
- When finished, end your session by pressing
Ctrl+d
.
Git is a version control system (VCS) that is used mainly for software development and other version control tasks. As a distributed revision control system it is aimed at speed, data integrity, and support for distributed, non-linear workflows. In other words, it backups and keeps track of everything you add, modify or delete in a repository.
Because the documentation you write should always be stored in a safe location. Even though databases and file storages can be configured to have backups, they are either costly or completely ineffective. Storing documents into a Git repository not only make sense, it's cost effective (free in most cases), fast and safe.
Having all your documentation in a central Git repository means you control 100% of your data at all times.
- Want to modify content outside the Wiki? You can.
- Want to transfer content somewhere else? You can.
- You want to completely stop using Wiki.js? Hopefully not, but should you want to, you can and there's nothing to extract or backup because everything is already in that Git repository.
There's quite an extensive list of Git providers, but we'll focus on the 4 major ones, which all offer free repository hosting.
GitHub
Public: Yes (free)
Private: Paid only
Supported authentication methods: SSH and Basic
Private: Paid only
Supported authentication methods: SSH and Basic
Using SSH (Repository):
This method gives access only to the repository, which is the recommended way.
- From the repository Settings page, select Deploy Keys in the sidebar.
- Click the Add deploy key button.
- Enter a title for the key (e.g. Wiki.js).
- Enter your public key content in the textbox. Learn how to create a new SSH key.
- Check the box [x] Allow write access.
- Save the key.
- Follow the instructions for SSH below.
Using SSH (Global):
This method gives access to all repository owned by the account. Do not use unless you know what you're doing!
- From the user dropdown menu, click Settings and select SSH and GPG Keys in the sidebar.
- Click the New SSH Key button.
- Enter a title for the key (e.g. Wiki.js).
- Enter your public key content in the textbox. Learn how to create a new SSH key.
- Save the key.
- Follow the instructions for SSH below.
Using Basic:
Ssh Key Generation
- From the Settings page, select Personal Access Tokens in the sidebar.
- Click on Generate New Token.
- Enter a description for this token (e.g. Wiki.js) and enable the repo permissions.
- Follow the instructions for Basic below.
GitLab
Public: Yes (free)
Private: Yes (free)
Supported authentication methods: SSH and Basic
Private: Yes (free)
Supported authentication methods: SSH and Basic
Using SSH (Repository):
This method gives access only to the repository, which is the recommended way.
- From the a project page, select Deploy Keys from the Settings dropdown menu.
- Enter a title for the key (e.g. Wiki.js).
- Enter your public key content in the textbox. Learn how to create a new SSH key.
- Check the box [x] Write access allowed.
- Save the key.
- Follow the instructions for SSH below.
Using SSH (Global):
This method gives access to all repository owned by the account. Do not use unless you know what you're doing!
- From the user dropdown menu, click Settings and select SSH Keys from the top menu.
- Enter your public key content in the textbox. Learn how to create a new SSH key.
- Enter a title for the key (e.g. Wiki.js).
- Save the key.
- Follow the instructions for SSH below.
Using Basic:
- From the Settings page, select Access Tokens from the top menu.
- Enter a name and expiration for this token (e.g. Wiki.js) and enable all permission scopes.
- Save the token.
- Follow the instructions for Basic below.
Bitbucket
Public: Yes (free, up to 5 users)
Private: Yes (free, up to 5 users)
Supported authentication methods: SSH and Basic
Private: Yes (free, up to 5 users)
Supported authentication methods: SSH and Basic
Visual Studio Team Services
Public: No
Private: Yes (free, up to 5 users)
Supported authentication methods: SSH and Basic
Private: Yes (free, up to 5 users)
Supported authentication methods: SSH and Basic
Using SSH:
- From User dropdown menu, select Security.
- Click on SSH Public Keys from the left sidebar.
- Click on the Add button.
- Enter a title for the key (e.g. Wiki.js).
- Enter your public key content in the textbox. Learn how to create a new SSH key.
- Save the key.
- Follow the instructions for SSH below.
Using Basic (Personal Access Tokens):
- From User dropdown menu, select Security.
- Click on Personal Access Tokens from the left sidebar.
- Click on the Add button.
- Enter a description for the key (e.g. Wiki.js) and set the desired expiration date.
- Check [x] the follow authorized scopes: Code (read, write and manage) and Code (status).
- Create the token.
- Follow the instructions for Basic below.
Using Basic (Alternate Credentials):
- From User dropdown menu, select Security.
- Click on Personal Authentication Credentials from the left sidebar.
- Check [x] the Enable alternate authentication credentials checkbox.
- Enter a username and password.
- Save the login.
- Follow the instructions for Basic below.
Now that your repository is setup using the instructions above, it's time to enter the info in the configuration file. Different parameters are required depending on the authentication type:
Common
Set the sslVerify parameter to
false
if the Git repository is using an SSL certificate that can't be verified by Wiki.js (e.g. self-signed or expired certificates). Setting it to false is obviously not recommended and a security risk.The signature block is required and must be identical to the account info of your Git provider. For example, if using Github, you must put your name and email exactly as entered in your GitHub profile.
Using SSH
You must define private key (privateKey) location when using the SSH authentication method. The private key must NOT be protected by a passphrase. If you want to a passphrase, you must configure your ssh-agent to handle it. Wiki.js will use the standard ssh executable installed on your system.
Example:
Using Basic (User/Pass or Token)
Using a standard username and password/token combination. Make sure to use a long and strong password.
Example:
You can use an existing repository (from an existing Wiki.js installation or any standard markdown-based documentation system), as long as the filenames match the requirements below. The existing content will be fetched during the first sync.
- All markdown files (.md) and folders are in lowercase (including the file extension).
- All markdown files (.md) and folders use the hyphen
-
to separate words. e.g.sample-file-tutorial.md
You can leave the
README.md
file as is; it will be ignored by Wiki.js.It is highly recommended to have remote sync enabled for backups and changes tracking purposes. It can however be disabled should you want to by setting
git: false
in your config.yml
file: