Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

DigiProduct's avatar

Access DigitalOcean from Windows with SSH

I'm a complete newbie as far as SSH goes ... never used it before in my life.

I'm just managed to install a Laravel project onto a Digital Ocean droplet using Laravel Forge.

Laravel Forge enforces the use of SSH keys for access (at least that's how I understand it)

Does anyone know of a simple step-by-step tutorial that would get me from complete beginner to being able to view and edit the .env file and view and edit the MySQL database?

Most of the stuff I'm finding when I searched is for Mac and based around username/password instead of SSH keys ....

Could anyone point me to a windows-based tutorial that could help me?

0 likes
8 replies
mvd's avatar

Hi @digiproduct

The docs can help you :) Make a ssh connection with Putty (Windows app), https://www.digitalocean.com/docs/droplets/how-to/connect-with-ssh/putty/

You can edit files with the vi editor for example https://www.tipsandtricks-hq.com/unix-vi-commands-take-advantage-of-the-unix-vi-editor-374

For your database is suggest sqlYog (community edition, this one is free). https://github.com/webyog/sqlyog-community/wiki/Downloads

You need a remote access to connect to the databae, check this tutorial https://www.digitalocean.com/community/tutorials/how-to-set-up-a-remote-database-to-optimize-site-performance-with-mysql

DigiProduct's avatar

@mvd I already tried those Digital Ocean ones, and I get errors if I try to use a username and password as they show ... presumably because Laravel Forge has enforced the use of SSH Keys on the droplet ...

BUT .. I'll try looking at the other tutorials you mention to see if they help ... thanks for your suggestions ...

DigiProduct's avatar

@mvd SSH is only available on the professional paid version of SQLyog unfortunately

artcore's avatar

Hi,

I don't know what you're using for an editor, but IDEs like phpstorm, netbeans, aptana have built in tools to connect to your server via ssh as well as remote db access. I assume Laravel Forge generated the public/private keys and the password?

If so you can easily setup connections in these IDEs. Download the private key and you're good to go.

.env is also easily accessed and edited this way.

Do check if Forge has remote db support, usually you have to enable this and perhaps open firewall ports + allow mysql to connect not only from localhost (lock remote access to your IP though).

DigiProduct's avatar

@artcore I'm using Visual Studio Code ... I never thought to look in that, but, now that I look, it has a Terminal so maybe there's some options there that I can explore ... thanks.

Ha... never loooked closely enough in Laravel Forge (because I'm very new to it) ... I just found that I can edit the .env file directly in Laravel Forge ... so that's solved!

Brilliant ... thanks @artcore I found that when looking around for remoter database in Forge and probably wouldn't have notice it without your prompting ... appreciate it.

Now, I just need remote database access ...

DigiProduct's avatar

@artcore I tried that sql extension for VisualStudioCode but couldn't get it to work using SSH Tokens ... but thanks for mentioning it because I'll problem end up using it on other projects where I can use a username/password connection rather than tokens.

neovive's avatar

I've been using Git for Windows for a few years. It installs a very functional Git environment (Bash, Terminal, etc.) that runs on top of Windows. Once installed, you can configure Bash and ssh settings similar to Linux. openssh is included, so you can use ssh-keygen directly without Putty.

To switch VS Code's built-in terminal to use Git Bish, add the following line to your settings.json: "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",

If you're running Windows 10, you can also try using the Windows Subsystem for Linux.

Please or to participate in this conversation.