This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| 1. Add following function to your powershell profile. | |
| If doesn't exist create under $ENV:USERPROFILE\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 | |
| #> | |
| function prompt { | |
| $p = Split-Path -leaf -path (Get-Location) | |
| "$p> " | |
| } | |
| <# | |
| 2. Save the profile and restart PowerShell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # First generate public/private key if doesn't exists | |
| ssh-keygen | |
| # For PowerShell | |
| type $ENV:USERPROFILE\.ssh\id_rsa.pub | ssh username@host "cat >> .ssh/authorized_keys" | |
| # For CMD | |
| type %USERPROFILE%\.ssh\id_rsa.pub | ssh username@host "cat >> .ssh/authorized_keys" |
NewerOlder