Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

Sunday, June 21, 2026

netgear readynas login for older units, ssh access

netgear  
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1,diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa root@<ip>

admin login rejects after connect.  Use admin on 6.0 and later units

--30--

Sunday, November 9, 2025

Install , configure, anable ssh server on wsl windows 11 ubuntu

 
search terms:
https://www.google.com/search?q=install+ssh+ubuntu22.04+wsl&rlz=1C1PNKB_enUS1187US1187&oq=install+ssh+ubuntu22.04+wsl&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCDc0NTdqMGo3qAIAsAIA&sourceid=chrome&ie=UTF-8&zx=1762747609120&no_sw_cr=1

1. Update and Install OpenSSH Server in WSL:
Open your Ubuntu 22.04 WSL distribution and Update the package lists.
Code
  sudo apt update
Install the OpenSSH server.
Code
  sudo apt install openssh-server
enable and start the ssh service.
Code
  sudo systemctl enable ssh --now
2. Configure SSH in WSL (Optional but Recommended):
  • Edit the SSH configuration file to enhance security (e.g., change the default port, disable password authentication for key-based authentication):
Code
  sudo nano /etc/ssh/sshd_config
  • Modify or add lines as needed (e.g., Port 2222, PasswordAuthentication no, PubkeyAuthentication yes).
  • Save and exit the file.
  • Restart the SSH service for changes to take effect:
Code
  sudo service ssh restart
3. Set Up Port Forwarding on Windows:
  • Open PowerShell as Administrator on your Windows host.
  • Get the IP address of your WSL instance and set up port forwarding. Replace 2222 with your chosen SSH port if you changed it in sshd_config:
Code
  $wsl_ip = (wsl hostname -I).trim()  netsh interface portproxy add v4tov4 listenport=2222 listenaddress=0.0.0.0 connectport=2222 connectaddress=$wsl_ip
4. Configure Windows Firewall:
  • Open Windows Defender Firewall with Advanced Security.
  • Create a new Inbound Rule:
    • Select "Port" and click Next.
    • Choose "TCP" and enter the port number you are using for SSH (e.g., 2222).
    • Allow the connection and apply the rule to all profiles. 
    • Name the rule (e.g., "WSL SSH") and finish the wizard. 
5. Generate and Copy SSH Key (for key-based authentication):
  • Generate Key on Client (e.g., your Windows machine or another remote machine):
Oops, something we

--30--

Saturday, March 2, 2024

ssh cipher KexAlgorithms errors on ssh


Problem with logging in on a system via ssh. 

typical messages are such as:

Unable to negotiate with 192.168.1.196 port 22: no matching cipher found. Their offer: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com

add Cipher stanza to config for the host

Host 192.168.1.196
  Ciphers aes256-ctr,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
  KexAlgorithms +diffie-hellman-group1-sha1
  User jws

suggested from



--30--

Saturday, July 9, 2022

Raspberry Pi OS (raspios) Headless configuration, SSH, Wifi




touch /Volumes/boot/ssh

vi wpa_supplicant.conf

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="NETWORK-NAME"
    psk="NETWORK-PASSWORD"
}

configure xrdp after setup


--30--

Monday, January 20, 2020

Saturday, January 18, 2020

escaping scp filename or command lines with spaces




link from here
https://stackoverflow.com/questions/19858176/how-do-i-escape-spaces-in-path-for-scp-copy-in-linux


scp user@example.com:web/tmp/Master\\\ File\\\ 18\\\ 10\\\ 13.xls .
 
scp root@vmnu1:/vmfs/volumes/datastore1/Ubuntu\\\ 16.04/* Ubuntu\ 16.04/ 



--30--

Friday, January 17, 2020

esxi remote mount



mounting vmfs over ssh on esxi system on a linux box

https://serverfault.com/questions/549858/rsync-over-ssh-to-esxi


why not mount esxi file systems on a third machine with sshfs and rsync support, like so:
#mount src esxi file system
sshfs root@aaa.bbb.ccc:/vmfs/volumes/ mnt/sshfs/
src="mnt/sshfs/"
vmd="Storage_vmfs5/vm1-data"
#mount dst esxi file system
sshfs root@xxx.yyy.zzz:/datastore-vms/ mnt/tmp/
dst="mnt/tmp/"
#copy vm files
rsync -av --progress --stats --delete --force "$src$vmd" "$dst"
#unmount
fusermount -u $src; fusermount -u $dst
 
--30--
 

Saturday, June 1, 2019

notes on accessing vmware esxi remotely

Notes on monitoring ESXI 6

SSH remote access

  1. Generate public/private keys. For more information, see the OpenBSD Reference Manual section in the OpenBSD.

    Note: The preceding link was valid as of June 22, 2016. If you find the link to be broken, provide feedback on the article and a VMware employee will update the article as necessary.

    Notes:
    • These instructions generate two files in ~/.ssh: id_rsa and id_rsa.pub.
    • In ESXi 5.x, the ssh-keygen command is located at /usr/lib/vmware/openssh/bin.
       
  2. On the remote host, store the public key content, id_rsa.pubin ~/.ssh/authorized_keys.

    Notes:
     
    • For ESXi 5.x, 6.0 and 6.5, the authorized_keys is located at: /etc/ssh/keys-<username>/authorized_keys
    • More than one key can be stored in this file.
       
  3. To allow root access, change PermitRootLogin no to PermitRootLogin yes in the /etc/ssh/sshd_config file.
  4. To disable password login, ensure that the ChallengeResponseAuthentication and PasswordAuthentication are set to no.
  5. Reload the service:
     
    • For ESXi, run the command:

      /etc/init.d/SSH restart
       
    • For ESX, run the command:

      service sshd reload

https://kb.vmware.com/s/article/1002866

Accessing process information (ps command)

https://kb.vmware.com/s/article/1010993

  1. Run the minimalized ps command:
    ps -Tcjstv
    The output shows information such PID, command-line used, and state.
  2. To generate output for certain processes and maintain a title row, run this command:

    ps -Tcjstv | egrep "WID|{proc-name}"
  3. The esxcfg-info command can offer some detail on process memory and CPU and is contained in the vm-support dumps. Process information in esxcfg-info is contained in sections called Groups, but the groups can be cumbersome to sift through.
    Grep these groups for information on process memory and CPU with the command:
    esxcfg-info | egrep -A85 "Group Id" | egrep "Group Name|Group Id|Total CPU|Total Memory|Used Time|Parent Id|----Active\.\.\.\." | less
  4. To check for file-system issues, run this command:

    stat –f {filesystem}

    Note:
    This checks inode use, from which a runaway process can sometimes be determined (even if you do not know exactly what files are involved).
    To check across all filesystems, run this command:

    stat -f `df | grep -v "Filesystem" | awk '{print $6}'` | egrep "File|Inodes"
  5. To view network connection (socket) details, run this command:

    esxcli network connection list
    Note: For ESXi 5.x and later, run this command:

    esxcli network ip connection list


--30--

Wednesday, August 29, 2018

mount Raspbian image and modify it


Notes on modifying a raspbian image to add ssh support and
preset for local wifi, so image can be dumped onto sd and be
ready to run.

https://ra...ypi.stackex.../how-can-i-mount-a-raspberry-pi-linux-distro-image

My settings:

fdisk partition info
Device                           Boot  Start      End Sectors  Size Id Type
2018-06-27-...stretch.img1       8192   96663   88472 43.2M  c W95 FAT32 (LBA)
2018-06-27-...stretch.img2      98304 9420799 9322496  4.5G 83 Linux
 
1st partition 512 * 8192 = 4194304
2nd partition 512 * 98204 = 50331648

boot:
mount -v -o offset=4194304 -t vfat 2018-06-27-raspbian-stretch.img /mnt
linux:
mount -v -o offset=50331648 -t ext4 2018-06-27-raspbian-stretch.img /mnt


You can't mount the image as a whole because it actually contains two partitions and a boot sector. However, you can mount the individual partitions in the image if you know their offset inside the file. To find them, examine the image as a block device with fdisk -l whatever.img. The output should include a table like this:
Device         Boot     Start       End  Blocks  Id System
whatever.img1            8192    122879   57344   c W95 FAT32 (LBA)
whatever.img2          122880   5785599 2831360  83 Linux
These are the two partitions. The first one is labelled "FAT32", and the other one "Linux". Above this table, there's some other information about the device as a whole, including:
Units: sectors of 1 * 512 = 512 bytes
We can find the offset in bytes by multiplying this unit size by the Start block of the partition:
  • 1st partition 512 * 8192 = 4194304
  • 2nd partition 512 * 122880 = 62914560
These can be used with the offset option of the mount command. We also have a clue about the type of each partition from fdisk. So, presuming we have directories /mnt/img/one and /mnt/img/two available as mount points:
mount -v -o offset=4194304 -t vfat whatever.img /mnt/img/one
mount -v -o offset=62914560 -t ext4 whatever.img /mnt/img/two
If you get an "overlapping loop" error here, your version of mount requires you to specify the size as well as the offset of the first partition. Unmount that, and use the number of blocks (57344) * 512 (= 29360128):
mount -v -o offset=4194304,sizelimit=29360128 \
    -t vfat whatever.img /mnt/img/one  
The second partition doesn't need a sizelimit since there's nothing after it in the image.
You can now access the two partitions. If you do not intend to change anything in them, use the -r (read-only) switch too. If you do change anything, those changes will be included in the .img file.
Note that the first partition is probably mounted on /boot in the second partition when the system is running.

-30-

Monday, January 15, 2018

Shell in a box on the raspberry pi

Raspian's Debian distribution repositories contain the shell in a box distribution.

sudo apt-get -y install shellinabox

will install the package.

access it via

https://<ip or name>:4200/

unless the port is configured to other port.  Since this is intended for remote management, the access to the demon is via encrypted https connection.  There are topics about  configuring this for non encrypted access, but one might as well do telnet if that is turned off.

Tagged with ssh as it is a similar access method if configured with encrypted shell access.

Here is a discussion:

http://sysmatt.blogspot.com/2014/11/manage-your-raspberry-pi-with-shell.html

good page on configuring shell in a box:  Local only, different port, etc.

https://www.tecmint.com/shell-in-a-box-a-web-based-ssh-terminal-to-access-remote-linux-servers/

Saturday, November 11, 2017

save and restore of putty session definitions from machine to machine

Putty sessions are saved in the registry entries for the Putty application.   That entry for the user must be backed up and restored to transfer the session information between machines.

Saving:
This incantation will back up the registry entries for a user to a file.

regedit /e "%userprofile%\desktop\putty-registry.reg" HKEY_CURRENT_USER\Software\Simontatham

The "manufacturer is "Simontatham" and is the same on all machines.

This saves the session entries in a Desktop file putty-registry.reg

File names on machine on restore (Merge):
In each Session entry there will be a location for any sessions which have a key file set for SSH preshared key.  It is not a good idea to save and transfer the preshared keys between machines, unless they are ones you have generated, and know what you are doing.

"PublicKeyFile" will be the path to the preshared key, and will need to point at the location for the preshared private key file on the new machine.  This should be done before merging and restoring onto the machine.

Restore (Merge):
This incantation will allow one to restore them on another machine.

The saved file will need to be located on a drive with a drive letter.  Otherwise the restore will not work.  Copying the putty-registry.reg file back to the new machine Desktop would be a good way to ensure this (it will be on C:).

Double clicking on the reg file once transferred to the other machine will restore those registry keys, and they should appear on the next invocation of putty.

You can also run regedit (from the run feature of the start menu) and select to import the file.

https://www.cyberciti.biz/tips/putty-session.html

stackoverflow article method here

Export

cmd.exe, require elevated prompt:

Only sessions:
regedit /e "%USERPROFILE%\Desktop\putty-sessions.reg" HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions
All settings:
regedit /e "%USERPROFILE%\Desktop\putty.reg" HKEY_CURRENT_USER\Software\SimonTatham

Powershell:

Only sessions:
reg export HKCU\Software\SimonTatham\PuTTY\Sessions ([Environment]::GetFolderPath("Desktop") + "\putty-sessions.reg")
All settings:
reg export HKCU\Software\SimonTatham ([Environment]::GetFolderPath("Desktop") + "\putty.reg")

Import

Double-click on the *.reg file and accept the import.

Alternative ways:

cmd.exe, require elevated command prompt:

regedit /i putty-sessions.reg
regedit /i putty.reg

PowerShell:

reg import putty-sessions.reg
reg import putty.reg

Note: do not replace SimonTatham with your username.
Note: It will create a reg file on the Desktop of the current user.
Note: It will not export related SSH keys.


https://stackoverflow.com/questions/13023920/how-to-export-putty-sessions-list

30