From c829d8857f8d80ce51a745f485d434dcb911a389 Mon Sep 17 00:00:00 2001 From: Cameron Durham Date: Sun, 22 Nov 2020 02:22:30 -0800 Subject: [PATCH 1/2] Clarify adding profile in ssh tutorial. Fixes: #183 --- TerminalDocs/tutorials/ssh.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/TerminalDocs/tutorials/ssh.md b/TerminalDocs/tutorials/ssh.md index 1cc23329..7f5647e7 100644 --- a/TerminalDocs/tutorials/ssh.md +++ b/TerminalDocs/tutorials/ssh.md @@ -16,18 +16,27 @@ In this tutorial, you'll learn how to set up a profile in Windows Terminal that ## Create a profile -You can start an SSH session in your command prompt by executing `ssh user@machine` and you will be prompted to enter your password. You can create a Windows Terminal profile that does this on startup by adding the `commandline` setting to a profile in your settings.json file. +You can start an SSH session in your command prompt by executing `ssh user@machine` and you will be prompted to enter your password. You can create a Windows Terminal profile that does this on startup by adding the `commandline` setting to a profile in your settings.json file inside the `list` of profile objects. -```js -"commandline": "ssh cinnamon@roll" +```json +{ + "name": "user@machine ssh profile", + "commandline": "ssh user@machine", +} ``` +For more information, see: + +* [Windows Terminal Profile Settings](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings) + ## Specify starting directory To specify the starting directory for a ssh session invoked by Windows Terminal, you can use this command: -```bash -"commandline": "ssh -t bob@foo \"cd /data/bob && exec bash -l\"" +```json +{ + "commandline": "ssh -t bob@foo \"cd /data/bob && exec bash -l\"" +} ``` The `-t` flag forces pseudo-terminal allocation. This can be used to execute arbitrary screen-based programs on a remote machine, e.g. when implementing menu services. You will need to use escaped double quotes as bourne shell derivatives don't do any additional parsing for a string in single quotes. From a57b9e09599fe6b02a36839b71e9d0d81bdd9202 Mon Sep 17 00:00:00 2001 From: Cameron Durham Date: Sun, 22 Nov 2020 02:33:38 -0800 Subject: [PATCH 2/2] Remove from docs link --- TerminalDocs/tutorials/ssh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TerminalDocs/tutorials/ssh.md b/TerminalDocs/tutorials/ssh.md index 7f5647e7..ea62af5c 100644 --- a/TerminalDocs/tutorials/ssh.md +++ b/TerminalDocs/tutorials/ssh.md @@ -27,7 +27,7 @@ You can start an SSH session in your command prompt by executing `ssh user@machi For more information, see: -* [Windows Terminal Profile Settings](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings) +* [Windows Terminal Profile Settings](https://docs.microsoft.com/windows/terminal/customize-settings/profile-settings) ## Specify starting directory