Bypass passkey ssh from terminal windows


sbztech2

Member
Local time
12:25 PM
Posts
5
OS
Windows 11 Pro
Hi,

Normally when i use superputty, i will set public key using pageant. But using powershell, how i can set to bypass it?

Any idea?

Thanks.
 
Windows Build/Version
Windows 24H2 (OS Build 26100.4061)

My Computer My Computer

At a glance

Windows 11 ProRyzen 5 360032GBNone
OS
Windows 11 Pro
Computer type
PC/Desktop
Manufacturer/Model
None
CPU
Ryzen 5 3600
Motherboard
Gigabyte B550
Memory
32GB
Graphics Card(s)
None
Sound Card
Build-in
Monitor(s) Displays
Dell
Hard Drives
500GB NV2 NVME SSD
PSU
650Watt
Cooling
AIO
Powershell 7.x supports ssh natively in powershell sessions, so when creating a new powershell session w/ssh as the connection type you just specific the public key with...
Powershell:
$My_Session = New-PsSession -KeyFilePath path\to\key.pem -Hostname <sshhost>....
 

My Computer My Computer

At a glance

Linux Mint
OS
Linux Mint
Computer type
Laptop
Manufacturer/Model
System76 Lemur Pro
I'm try but it said permission denied with passphase key although i try with ssh -i C:/Users/zaina/.ssh/id_rsa.pub [email protected] -p 35000 and can login with same ppk.
 

My Computer My Computer

At a glance

Windows 11 ProRyzen 5 360032GBNone
OS
Windows 11 Pro
Computer type
PC/Desktop
Manufacturer/Model
None
CPU
Ryzen 5 3600
Motherboard
Gigabyte B550
Memory
32GB
Graphics Card(s)
None
Sound Card
Build-in
Monitor(s) Displays
Dell
Hard Drives
500GB NV2 NVME SSD
PSU
650Watt
Cooling
AIO
Pretty sure powershell doesn't support ppk format
 

My Computer My Computer

At a glance

Linux Mint
OS
Linux Mint
Computer type
Laptop
Manufacturer/Model
System76 Lemur Pro
I use conversion to export ssh key for use with powershell. But it still prompt the password. The idea is i want use without manually key-in password just like enable key in pageant with super putty. I'm not sure if powershell have features like that.
 

My Computer My Computer

At a glance

Windows 11 ProRyzen 5 360032GBNone
OS
Windows 11 Pro
Computer type
PC/Desktop
Manufacturer/Model
None
CPU
Ryzen 5 3600
Motherboard
Gigabyte B550
Memory
32GB
Graphics Card(s)
None
Sound Card
Build-in
Monitor(s) Displays
Dell
Hard Drives
500GB NV2 NVME SSD
PSU
650Watt
Cooling
AIO
If you mean a private key password you would need to save the private key without a password
 

My Computer My Computer

At a glance

Linux Mint
OS
Linux Mint
Computer type
Laptop
Manufacturer/Model
System76 Lemur Pro
Mean i need create new private key with no password right? So there is no way powershell can save password session from private key? If so, then i will stick with current method since our policy private key need have a password.
 

My Computer My Computer

At a glance

Windows 11 ProRyzen 5 360032GBNone
OS
Windows 11 Pro
Computer type
PC/Desktop
Manufacturer/Model
None
CPU
Ryzen 5 3600
Motherboard
Gigabyte B550
Memory
32GB
Graphics Card(s)
None
Sound Card
Build-in
Monitor(s) Displays
Dell
Hard Drives
500GB NV2 NVME SSD
PSU
650Watt
Cooling
AIO
You could use ssh-agent with powershell, but no way to do it with just powershell
 

My Computer My Computer

At a glance

Linux Mint
OS
Linux Mint
Computer type
Laptop
Manufacturer/Model
System76 Lemur Pro

My Computer My Computer

At a glance

Windows 11 ProRyzen 5 360032GBNone
OS
Windows 11 Pro
Computer type
PC/Desktop
Manufacturer/Model
None
CPU
Ryzen 5 3600
Motherboard
Gigabyte B550
Memory
32GB
Graphics Card(s)
None
Sound Card
Build-in
Monitor(s) Displays
Dell
Hard Drives
500GB NV2 NVME SSD
PSU
650Watt
Cooling
AIO
In order to remote into a system with SSH via Powershell, both Powershell and ssh server have to be installed AND you need to add a subsystem command to your sshd_config file on every system you want to remote into.

Code:
Subsystem powershell /usr/bin/pwsh -sshs -NoLogo
 

My Computer My Computer

At a glance

Linux Mint
OS
Linux Mint
Computer type
Laptop
Manufacturer/Model
System76 Lemur Pro
Back
Top Bottom