Access Oracle Database Service on Oracle Cloud Using SSH and SQL Developer for VS Code


Introduction
Using this guide, we are going to access the Oracle Database Service on Oracle Cloud, over SSH, using SQL Developer extension for VSCode.
SQL Developer Desktop already has this option (Picture credits - Benny Vaessen)
However there doesn’t seem to be much traction on getting support of SSH Tunneling as a option to SQL Developer extension for VSCode (another source).
However Kris Rice made a really good guide about setting up remote environments which has inspired this blog.
This guide will give you a SQL Developer installation on your host called VS Code - Server. Once configured, you’ll have DB access, however for working on files/git, you’ll be working remotely, so all work will be stored on the host.
For git you could use Per-Repository Git Configuration: Each developer should set their Git user configuration on a per-repository basis using:
git config user.name "Your Name"
git config user.email "your.email@example.com"
This ensures that commits are correctly attributed, even if the global configuration is shared. However this isn’t a Git blog.
Prerequisites
A SSH url/IP address e.g. 3.4.5.6 & port e.g. 22 and user e.g. opc
A private key for the Oracle Database Service on Oracle Cloud
VS Code
DB Connection Details e.g. username, Password, Host, Port, Service Name
Guide
Follow this guide for a to create a SSH Host. I’m going to refer to my host as
dev
for this blogOnce you’ve opened VS Code in SSH (following the guide above), click Extensions > SQL Developer and click the Install in SSH button
If you manage to install it, then great - go to the last step! However, if you get something like this:
ENOSPC: no space left on device, write
or this
End of central directory record signature not found. Either not a zip file, or file is truncated
or this in Output > Server
2025-04-22 12:39:44.481 [info] Getting Manifest... oracle.sql-developer 2025-04-22 12:39:44.492 [info] Installing extension: oracle.sql-developer {"installPreReleaseVersion":false,"donotVerifySignature":false,"context":{"clientTargetPlatform":"win32-x64"},"isApplicationScoped":false,"profileLocation":{"$mid":1,"fsPath":"/home/opc/.vscode-server/extensions/extensions.json","external":"file:///home/opc/.vscode-server/extensions/extensions.json","path":"/home/opc/.vscode-server/extensions/extensions.json","scheme":"file"},"productVersion":{"version":"1.99.3","date":"2025-04-15T23:18:46.076Z"}} 2025-04-22 12:39:49.803 [warning] Failed downloading vsix. Unable to write file '/home/opc/.vscode-server/data/CachedExtensionVSIXs/.0bf86609-8779-46d4-8dea-f3bc42b09255' (Unknown (FileSystemError): Error: ENOSPC: no space left on device, write). Retry again... oracle.sql-developer 2025-04-22 12:39:55.319 [warning] Failed downloading vsix. Unable to write file '/home/opc/.vscode-server/data/CachedExtensionVSIXs/.ca1d476c-2f44-4ee6-b39c-d7b3e3e2ea13' (Unknown (FileSystemError): Error: ENOSPC: no space left on device, write). Retry again... oracle.sql-developer 2025-04-22 12:40:00.846 [error] Error while installing the extension oracle.sql-developer End of central directory record signature not found. Either not a zip file, or file is truncated. file:///home/opc/.vscode-server/extensions/extensions.json 2025-04-22 12:40:01.847 [error] Error: End of central directory record signature not found. Either not a zip file, or file is truncated. at m6 (file:///home/opc/.vscode-server/cli/servers/Stable-17baf841131aa23349f217ca7c570c76ee87b957/server/out/server-main.js:48:2499) at file:///home/opc/.vscode-server/cli/servers/Stable-17baf841131aa23349f217ca7c570c76ee87b957/server/out/server-main.js:48:3827 at /home/opc/.vscode-server/cli/servers/Stable-17baf841131aa23349f217ca7c570c76ee87b957/server/node_modules/yauzl/index.js:40:7 at /home/opc/.vscode-server/cli/servers/Stable-17baf841131aa23349f217ca7c570c76ee87b957/server/node_modules/yauzl/index.js:190:5 at /home/opc/.vscode-server/cli/servers/Stable-17baf841131aa23349f217ca7c570c76ee87b957/server/node_modules/yauzl/index.js:712:5 at /home/opc/.vscode-server/cli/servers/Stable-17baf841131aa23349f217ca7c570c76ee87b957/server/node_modules/yauzl/fd-slicer.js:33:7 at FSReqCallback.wrapper [as oncomplete] (node:fs:683:5)
then continue reading
In VS Code > Terminal run this
df -h
You’ll see something like this
Filesystem Size Used Avail Use% Mounted on devtmpfs 7.7G 0 7.7G 0% /dev tmpfs 7.7G 1.4G 6.4G 17% /dev/shm tmpfs 7.7G 1.1M 7.7G 1% /run tmpfs 7.7G 0 7.7G 0% /sys/fs/cgroup /dev/mapper/vg00-root 9.6G 3.8G 5.4G 42% / tmpfs 7.7G 19M 7.7G 1% /tmp /dev/mapper/vg00-var 9.6G 1.2G 8.0G 13% /var /dev/mapper/vg00-var_tmp 958M 56K 891M 1% /var/tmp /dev/sda2 974M 256M 652M 29% /boot /dev/mapper/vg00-home 958M 643M 248M 73% /home /dev/mapper/vg00-opt 33G 4.0G 28G 13% /opt /dev/mapper/vg00-var_log 3.8G 141M 3.5G 4% /var/log /dev/sda1 128M 5.1M 123M 4% /boot/efi /dev/mapper/vg00-var_log_audit 1.9G 33M 1.8G 2% /var/log/audit /dev/sdj 196G 29G 157G 16% /u01 /dev/asm/commonstore-477 5.0G 282M 4.8G 6% /opt/oracle/dcs/commonstore tmpfs 1.6G 0 1.6G 0% /run/user/102 tmpfs 1.6G 0 1.6G 0% /run/user/101 tmpfs 1.6G 0 1.6G 0% /run/user/1000
See that
/home
has got248M
, but SQL Developer needs500MB
. In this case identify somewhere else that has got at least500MB
. I’m going to choose/opt
which has28G
freeRun these commands (changing
/opt
to your target mount)sudo mkdir -p /opt/vscode sudo chown opc:opc /opt/vscode
Now open user preferences in VS Code. Press F1 and type Pref
In Search Settings, search for this
remote.SSH.serverInstallPath
Now fill in the Item with your host name (exactly the same as you set up for SSH) and set the Value as the folder you created.
Quit VS Code and open it again (using the host)
Attempt to install SQL Developer again from the Extensions side bar.
success!
Form a DB connection
ENJOY!
What’s the picture? Its my daughter’s horse, Wren, at Kirkby Overblow. Kirkby Overblow is known for its historic holy wells, particularly St Helen’s Well, which is located behind the churchyard and is said to have healing power! - Visit Yorkshire!
Subscribe to my newsletter
Read articles from Matt Mulvaney directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Matt Mulvaney
Matt Mulvaney
With around 20 years on the job, Matt is one of the most experienced software developers at Pretius. He likes meeting new people, traveling to conferences, and working on different projects. He’s also a big sports fan (regularly watches Leeds United, Formula 1, and boxing), and not just as a spectator – he often starts his days on a mountain bike, to tune his mind.