Fix for “An SSH Installation Couldn’t Be Found” Error When Connecting to a Remote Server in VS Code

Operating System: Windows 10

When using the Remote-SSH extension in VS Code for remote development, you might encounter the error message “An SSH installation couldn’t be found” during the first connection attempt to a remote server. This error indicates that the VS Code Remote-SSH extension cannot find ssh.exe in your Windows system.

By default, VS Code looks for the ssh command in the system’s PATH environment variable. If it’s not found, this error occurs.

One solution is to install the Git package on your Windows system, which includes ssh.exe. Then, you can specify the exact path to ssh.exe in the settings of the VS Code Remote-SSH extension by configuring the remote.SSH.path option. Here’s how:

  1. Install the Git package, which includes ssh.exe.
  2. In VS Code, press F1 -> type Remote-SSH: Settings and hit Enter. This will open the Remote-SSH configuration file.
  3. Locate the remote.SSH.path option and set its value to the absolute path of ssh.exe on your Windows system. For example:
C:\Programs\Git\usr\bin\ssh.exe

Alternatively, you can install the OpenSSH package, which also includes ssh.exe, and use that instead of the Git-provided version.

Setting Up SSH Key Authentication and Communication with GitHub

When connecting to an existing GitHub repository, you can use SSH keys (public and private) for authentication. For instructions on how to create an SSH key and add it to GitHub, refer to the official GitHub documentation: https://docs.github.com/cn/authentication/connecting-to-github-with-ssh.

Key steps to note:

  1. You need to create a .ssh folder in your home directory and copy the SSH private key into it. You do not need to copy the public key into this folder. Instead, paste the contents of your public key into the Settings section of your GitHub account by following the steps here: Adding a new SSH key to your GitHub account.
  2. The file name of your SSH private key should be id_rsa, as this is one of the default names git looks for when locating the private key. If the file is named differently, you will encounter an error such as “[email protected]: Permission denied (publickey).” If this happens, rename your private key file to id_rsa.
  3. If you’re using a Linux-based OS like Ubuntu, ensure that no other users can read or write to the private key file. Run the following commands:
chmod o-rwx ./id_rsa
chmod g-rwx ./id_rsa

After completing the setup, you can use the SSH private key in your .ssh folder for authentication and communication with GitHub. To verify the setup, open Git Bash and run the following command:

ssh -T [email protected]

If you see a message like this:

Hi yourusername! You've successfully authenticated, but GitHub does not provide shell access.

It means you’ve successfully set up SSH key authentication with GitHub.

References:

Windows 10 or Windows 11 Only Shows One Hard Drive After Reinstallation? Here’s the Fix

If you have two hard drives in your system but only see one in “This PC” after reinstalling Windows 10 or 11, follow these steps to resolve the issue:

  1. Right-click on This PC and select Manage.
  2. Go to Device Manager under System Tools and check Disk drives. If both drives are listed, it means the second drive is recognized and there is no issue with the hardware.
  3. Now, open Storage > Disk Management.
  4. Right-click on the second hard drive and select Change Drive Letter and Paths. Assign a drive letter to the second drive.

After doing this, the second drive should appear in This PC in File Explorer.

Windows 10或Windows 11有两个硬盘,但重装系统后在“此电脑”里只显示一个的问题及解决方法

右键点“此电脑”->系统工具->设备管理->磁盘驱动器,看看里面是否有两个硬盘驱动,如果是,说明第二块磁盘驱动没有问题,再打开存储->磁盘管理,右键点击第二块磁盘->更改驱动器号和路径,设置一下驱动器号,就可以在资源管理器的“此电脑”路径下出现了。

How to Restore Files Deleted by Windows Defender on Windows 10 and Windows 11?

For Windows 10:
1.Open Windows Security Center
2.Go to Virus & threat protection
3.Navigate to Threat history
4.Check the Detected threats
5.Select Restore

For Windows 11:
1.Open Windows Security Center
2.Go to Virus & threat protection
3.Navigate to Protection history
4.Check the Quarantined threats
5.Select Restore

Important Note
Restoring quarantined files requires administrative privileges on your Windows system.

Windows10和Windows11如何还原被Windows Defender删除的文件?

对于Windows10:

打开Windows安全中心->病毒和威胁防护->威胁历史记录->检查出的威胁->还原

对于Windows11:

打开Windows安全中心->病毒和威胁防护->保护历史记录->已隔离威胁->还原

注意事项

在还原被隔离的文件时,需要你有Windows系统的管理员权限。

Windows11更新后闪屏问题的解决方法

今天我更新Windows11系统并重启后,电脑屏幕出现了闪烁问题。

我检查显卡驱动,无论是Nvidia显卡驱动还是Intel显卡驱动都是最新的。那么问题出在哪里?

我猜测是因为我的操作系统是从Windows10升级而来,之前Windows10下某些Intel显卡驱动的隐藏设置(配置)在Windows11下与新版本的显卡驱动不兼容所致。

因此,我使用Display Driver Uninstaller (DDU)彻底卸载Intel显卡驱动后,再重装最新版本的Intel显卡驱动,就解决了电脑屏幕闪烁问题!

注意,安装最新版本的Intel显卡驱动程序时需要以管理员身份运行安装程序。

最新版Intel显卡驱动官网下载地址:

https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html

最新版DDU官网下载地址:

https://www.wagnardsoft.com/display-driver-uninstaller-ddu-

参考

https://bbs.pcbeta.com/viewthread-1944975-1-1.html

How to Fix Screen Flickering Issue After Windows 11 Update

Today, after updating my Windows 11 system and rebooting, I encountered a screen flickering problem.

I checked both my Nvidia and Intel graphics drivers, and they were up to date. So where was the issue?

I suspected that the problem arose because my system had been upgraded from Windows 10 to Windows 11. Some hidden settings or configurations from the older Intel graphics drivers on Windows 10 might have been incompatible with the newer drivers on Windows 11.

To resolve the issue, I used Display Driver Uninstaller (DDU) to completely remove the Intel graphics driver. Afterward, I reinstalled the latest version of the Intel graphics driver, and the screen flickering problem was fixed!

Note: When installing the latest Intel graphics driver, make sure to run the installer as an administrator.

Download the latest Intel graphics driver here: https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html

Download the latest DDU here: https://www.wagnardsoft.com/display-driver-uninstaller-ddu-

Reference
https://bbs.pcbeta.com/viewthread-1944975-1-1.html

LayUI列间距注意点

1 列间距是在.layui-col-* 元素上使用padding样式实现的,并且.layui-col-元素最好不要再自定义style,否则会导致样式混乱。参考:
https://blog.csdn.net/qq_40943363/article/details/118052587


2 一行中最左的列不会出现左边距,最右的列不会出现右边距。


3 使用列间距还会导致.layui-col-*元素出现上下padding。例如.layui-col-space20列间距会被浏览器渲染为padding: 10px


4 如果需要的列间距大于30px(一般不常见),请采用列偏移。

VirtualBox Linux虚拟机与Windows宿主机的共享文件夹里面无法创建符号链接的解决方法

我的软件环境:

VirtualBox虚拟机:Ubuntu 22

宿主机:Windows 10

在Ubuntu 22虚拟机中创建符号链接时,可能的报错有以下几种:

第一种,在运行npm install esbuild时报错:

Error: EPERM: operation not permitted, symlink '../esbuild/bin/esbuild' -> '/var/www/reverb.test/node_modules/.bin/esbuild'

第二种,执行PHP代码创建符号链接时报错:

symlink(): Operation not permitted

第三种,运行ln命令时报错:

ln: failed to create symbolic link 'xxx.so.0': Read-only file system

第四种,运行cp命令时报错:

cannot create symbolic link `xxxx':Read-only file system

第五种,运行cp命令时报错:

cannot create symbolic link `xxxx': Protocol error

原因是VirtualBox从安全角度出发,限制了软链接(符号链接)的创建。如果想正常使用符号链接,需要对虚拟机设置 VBoxInternal2/SharedFoldersEnableSymlinksCreate/<share_folder_name> 这个 extradata。这里顺带一提,对于 vagrant,这个选项只要你运行 vagrant up之后这个选项便会自动设置好。可以使用 VboxManage设置这个 extradata ,这个工具在 Windows 下是和 VirtualBox 图形界面在一个相同目录的。以下是详细步骤:

1 关闭 VirtualBox。

2 以管理员身份打开命令行窗口,cd到VirtualBox安装目录(例如cd C:\Programs\Oracle\VirtualBox),执行如下命令:

VBoxManage setextradata YOURVMNAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/YOURSHAREFOLDERNAME 1

其中:

YOURVMNAME填写ubuntu 虚拟机系统的名称

YOURSHAREFOLDERNAME填写共享文件夹的名称,注意这个共享文件夹名称是你在 VirtualBox 中设置共享时对应的“共享文件夹名称”一栏的内容,不是共享文件夹的路径或者文件夹名称。

3 以管理员身份运行VirtualBox

参考

https://blog.csdn.net/tekenuo/article/details/82386552

https://tty.moe/blog/virtualbox-symlink-windows