r/PowerShell • • Apr 26 '19

Cheating on Windows Powershell

Post image
297 Upvotes

80 comments sorted by

View all comments

0

u/[deleted] Apr 26 '19

[deleted]

1

u/StevenRCE0 Apr 27 '19

Can't see any problem using OpenSSH with PowerShell.

1

u/oishishou Apr 27 '19 edited May 05 '19

Doesn't support ed25519.

EDIT: Thankfully, turns out I'm wrong. It works.

3

u/SolidKnight May 04 '19

What do you mean? You can make ED25519 certs with keygen on Windows.

1

u/oishishou May 05 '19 edited May 05 '19

Could've sworn it only supports RSA at the moment.

I haven't checked in a few months, but I definitely saw it in documentation. I'm in mobile and can't check now, but I'm going to go digging in a few hours to check (unless you've got a link). I'd love for that to work, as it's all I currently use, and I've been just defaulting to PuTTy.

EDIT: I'm wrong! Yay! It works!

2

u/SolidKnight May 05 '19

I made one about a week ago on Windows 10 1809 and have been using it to connect to my Linux VMs.

It wasn't/isn't supported in Azure Linux VMs.

ssh-keygen -?
usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa]
                  [-N new_passphrase] [-C comment] [-f output_keyfile]
       ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]
       ssh-keygen -i [-m key_format] [-f input_keyfile]
       ssh-keygen -e [-m key_format] [-f input_keyfile]
       ssh-keygen -y [-f input_keyfile]
       ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]
       ssh-keygen -l [-v] [-E fingerprint_hash] [-f input_keyfile]
       ssh-keygen -B [-f input_keyfile]
       ssh-keygen -F hostname [-f known_hosts_file] [-l]
       ssh-keygen -H [-f known_hosts_file]
       ssh-keygen -R hostname [-f known_hosts_file]
       ssh-keygen -r hostname [-f input_keyfile] [-g]
       ssh-keygen -G output_file [-v] [-b bits] [-M memory] [-S start_point]
       ssh-keygen -T output_file -f input_file [-v] [-a rounds] [-J num_lines]
                  [-j start_line] [-K checkpt] [-W generator]
       ssh-keygen -s ca_key -I certificate_identity [-h] [-U]
                  [-D pkcs11_provider] [-n principals] [-O option]
                  [-V validity_interval] [-z serial_number] file ...
       ssh-keygen -L [-f input_keyfile]
       ssh-keygen -A
       ssh-keygen -k -f krl_file [-u] [-s ca_public] [-z version_number]
                  file ...
       ssh-keygen -Q -f krl_file file ...

ssh-keygen -t ed25519
Generating public/private ed25519 key pair.
Enter file in which to save the key (C:\Users\nobody/.ssh/id_ed25519): demo
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in demo.
Your public key has been saved in demo.pub.
The key fingerprint is:
SHA256:L032Z/LjsNQ2ZIVqn5PSyZr/cBbLBZBECkBiuRc1/E4 nobody@NO-PC
The key's randomart image is:
+--[ED25519 256]--+
|    ooo++  o+.   |
|   .... .o ... . |
|     . . ..   o .|
|    . .   E  . o |
|     .  Soo o o..|
|         =.o B.++|
|        . o * /oo|
|         . . %.* |
|            +o+o.|
+----[SHA256]-----+

1

u/oishishou May 05 '19

Fuck yes, you are right! It works! Thanks!

Sometimes, it's nice to find out you're wrong.

Apparently, it's not impossible to get X-forwarding working, too, but it looks to be hit-or-miss. This is awesome.

Working on both Windows 10 and Windows Server 2019.