Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Right now we only support bash over ssh, but we could also support other shells like zsh.

Posting so people can upvote.

Thank you!

You must be logged in to vote

Replies: 49 comments · 77 replies

Comment options

I'm unsure if this is the same as the issue I'm having. When I SSH into a server, the .zshrc file does not get executed. Therefore commands like nvm or node don't work correctly.

If it's not the same issue I will create another issue for that.

Screen Shot 2021-10-11 at 2 40 15 PM

You must be logged in to vote
4 replies
@mityukov
Comment options

When I log into a remote server, I don't get my aliases, etc (~/.bashrc). Even though I have Bash on that server.

Could it be because of this check:
image

Are there other ways to check if I'm "running interactively"?

@vorporeal
Comment options

Yes, it's probably due to the check against $PS1.

Perhaps try the solution from this StackOverflow post? https://unix.stackexchange.com/questions/259858/can-bash-tell-an-interactive-ssh-session-from-an-in-line-ssh-session

tl;dr, something like:

[ tty >/dev/null ] && return
@mityukov
Comment options

Nope :-(

# If not running interactively, don't do anything
#[ -z "$PS1" ] && return
echo before
[ tty >/dev/null ] && return
echo after
$source ~/.bashrc
before
@elviskahoro
Comment options

@mityukov I'm sweeping through this discussion to see what all is till not working. Is this fixed for you?

Comment options

@fishcharlie I believe it is the same issue, since Warp's wrapped ssh is currently hardcoded to run bash in the ssh session.

You must be logged in to vote
0 replies
Comment options

From #215
@joeydotdev
clear does clear the terminal on Debian 10 boxes
To Reproduce
Steps to reproduce:

ssh into debian box
run clear
Expected behaviour
Expected to have terminal cleared

image

You must be logged in to vote
0 replies
Comment options

Any reason this was moved to a discussion as opposed to an issue? I feel like it being an issue would lead to more visibility, and be considered an "action item". Warp really needs to add support for this. This is a major reason why I don't use Warp as much as Terminal currently. This should be at the top of the priority list for the Warp team.

You must be logged in to vote
5 replies
@elviskahoro
Comment options

@fishcharlie moved it so we could leverage GitHub discussion's ability to reply directly to a specific comment. We still have regular GitHub issues open for SSH but those point out specific bugs and don't necesarilly communicate whether our SSH support is in a usable (reliable) state (it's not).

@elviskahoro
Comment options

I'll send out updates here!

@coxley
Comment options

@fishcharlie moved it so we could leverage GitHub discussion's ability to reply directly to a specific comment. We still have regular GitHub issues open for SSH but those point out specific bugs and don't necesarilly communicate whether our SSH support is in a usable (reliable) state (it's not).

How involved is getting shell-parity for ZSH in SSH? Assuming it's not possible to open that up to outside contributors? :)

@elviskahoro
Comment options

@zheng was working on that last week. I think we have a working build coming this wednesday right? @zheng

@zheng
Comment options

yes, that's correct

Comment options

hey, just popping in to point out that even with a bash shell, this doesn't work at all on a nixos host. nixos binaries are not in standard locations, and i'm guessing something around that is to blame, but currently can't execute any commands at all:
image

You must be logged in to vote
1 reply
@elviskahoro
Comment options

Made an issue for this: #1203

Comment options

Clear does not work on Debian 10
From @joeydotdev via #215

Describe the bug

`clear` does clear the terminal on Debian 10 boxes

To Reproduce

Steps to reproduce:

  1. ssh into debian box
  2. run clear

Expected behaviour

Expected to have terminal cleared

Screenshots

image

You must be logged in to vote
1 reply
@GalenMoo
Comment options

+1 to this issue. Same issue on Amazon Linux 2 instances.

Comment options

Tab completion makes Warp unresponsive
From @activatedgeek via #229

Describe the bug

Tab completion in an SSH terminal appears to visibly make Warp unresponsive for more than a few seconds. Switching to the default terminal does not appear to have this issue, and is able to normally execute tab completion on the same machine.

To Reproduce

Steps to reproduce:

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error '...'

Expected behaviour

1. `ssh` into a machine of your choice.
2. Type `cd ~/<TAB>`
3. Warp becomes unresponsive for a few seconds, but then behaves as it should with completion recommendations.

Screenshots

No response

Operating System

MacOS

OS Version

11.5

Additional context

No response

You must be logged in to vote
0 replies
Comment options

Tab locks / freezes when disconnecting from VPN

From @wrhall via #282

Describe the bug

Initial conditions: When I am on VPN & ssh onto a host I can only access through VPN
Trigger: I disconnect from VPN
Result: The terminal tab completely locks up (ideally, it would let me ctrl+c or something, although iterm is similar. iterm does unlock faster, though)

To Reproduce

Steps to reproduce:

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error '...'

Expected behaviour

Eventual result: https://app.warp.dev/block/flNRXVAPVBczQsOFEuqKIL
Expect it much faster :)

Screenshots

https://capture.dropbox.com/cf11hrIqzaKQV4qj

Operating System

MacOS

OS Version

11.6

Additional context

No response

You must be logged in to vote
0 replies
Comment options

SSH does not support other shells

From @NikosEfthias

Describe the bug

connecting to remote ssh fails with message 

<W> fish: An error occurred while redirecting file 'unset PS1; unset PS2; set -o vi; set +o vi; HISTCONTROL=ignorespace; printf '\u1b\u50\u24\u64{"hook": "InitShell", "value": {"shell": "bash"}}\u9c''
open: No such file or directory


### To Reproduce

Steps to reproduce:
1. run `ssh user@yourserver`
2. have fish as a shell on the remote (not sure if this is relevant tho)


### Expected behaviour

```shell
connect to remote with no issues

Screenshots

image

Operating System

MacOS

OS Version

11.6 big sur

Additional context

No response

You must be logged in to vote
5 replies
@elviskahoro
Comment options

From @mquinnv
so this same problem has basically made it so i can't use warp. i too had fish as my remote shell, but changing it to /bin/sh yields the same problem. changing my mac shell to /bin/zsh results in the same thing.

@elviskahoro
Comment options

From @mquinnv
this is happening on Monterey as well.

@elviskahoro
Comment options

from @platy
I've also got this, in my case I'm trying to ssh to a host which only has sh, it looks like warp can only ssh to hosts with bash. I get:

ash: syntax error: unexpected "("
Connection to localhost closed.

From the verbose output, I think the key is:

debug1: Sending command: exec -a bash bash --rcfile <(echo 'unset PS1; unset PS2; set -o vi; set +o vi; HISTCONTROL=ignorespace; printf '\\''\\u1b\\u50\\u24\\u64{"hook": "InitShell", "value": {"shell": "bash"}}\\u9c'\\''')
@elviskahoro
Comment options

From @NikosEfthias
For now, I found a workaround.
If you connect to your server from tmux within warp everything works fine.

@mloureiro
Comment options

This also happens for zsh

Comment options

Warp locks / freezes when SSH loses network (even local sessions)

From @tebrown via #349

Describe the bug

I was ssh'ing into a remote machine. Just as it was 'Starting Bash...', I lost network.  All my sessions locked up, including the ones connected to the local machine. I had to force quit the app.

To Reproduce

Steps to reproduce:

  1. ssh to remote machine
  2. Just as it is trying to start bash, disable wifi or disconnect network
  3. Terminals all lock up

Expected behaviour

If network goes away while establishing a remote connection, it should simply error out and return back to the local session

Screenshots

No response

Operating System

MacOS

OS Version

12.0.1

Additional context

No response

You must be logged in to vote
0 replies
Comment options

Locale error on SSH

From @zilahu via #384

Describe the bug

When I ssh into a remote host, and there are some bash error, the error message gets into the command editor area.

ssh examplehost

bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
cursus: error: unexpected __iterm2_prompt_command, try --help


bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
cursus: error: unexpected __iterm2_prompt_command, try --help

To Reproduce

Steps to reproduce:

  1. make some error on remote host .bash_profile (eg. missing locale)
  2. ssh to remotehost
  3. press enter
  4. See the bash: warning ... in the command area

Expected behaviour

The error displays as result block and command prompt area is empty

Screenshots

CleanShot 2021-11-09 at 07 44 16

Operating System

MacOS

OS Version

12.0.1

Additional context

No response

You must be logged in to vote
1 reply
@elviskahoro
Comment options

from @serasset
I confirm that this happens each time an error message is broadcasted while no command is executed. This happens for instance if there is a broadcast message from the host.

Comment options

SSHing into the same machine more than once fails

From @benjibee via #387

Describe the bug

If you log in to the same machine more than once, you will notice this following message:

ControlSocket /Users/<your-username>/.ssh/bad89d3452f63f92c2a9a56e8d78b02dfebacf1e already exists, disabling multiplexing

To Reproduce

Steps to reproduce:

  1. SSH into a remote client
  2. Disconnect
  3. Connect again to same client
  4. See error ControlSocket /Users/<your-username>/.ssh/bad89d3452f63f92c2a9a56e8d78b02dfebacf1e already exists, disabling multiplexing
  5. Attempt to use use path completion, etc. to no avail

Expected behaviour

Multiplexing should be enabled

Operating System

MacOS 12.0.1

Additional context

This error is listed on the Known Issues page of Warp's documentation but it has no corresponding issue or timeline. The document was updated 2-months ago but it says it will be fixed "soon". Most of my work in the terminal is on remote machines and this renders Warp nearly useless for me.

You must be logged in to vote
2 replies
@zheng
Comment options

This issue has been fixed

@liviu-lesan
Comment options

It still persist for me with stable_05

Comment options

Shell integration breaks bash scripts

From @cam-narzt via #397

Describe the bug

Warp is somehow breaking the following code in my bash setup files: https://github.com/CamJN/dot-files/blob/master/.bash.d/completion#L15-L32

It results in this error in Warp.app, but not in Terminal.app: `bash: old_filedir: command not found`

To Reproduce

Pull down my dotfiles and install the deps, then start bash in Warp.

Expected behaviour

I expect my shell to execute without interference from my terminal emulator.

Screenshots

No response

Operating System

MacOS

OS Version

11.6.1

Additional context

No response

You must be logged in to vote
0 replies
Comment options

avoiding setlocale warning on remote hosts

From @serasset via #406

Describe the solution you'd like?

Preferences should allow me to disable environment variable transmission to the remote host when connecting with ssh.

A better solution could be to "translate" macos local names to the remote host locale names.

Is your feature request related to a problem? Please describe.

Each time I connect to a linux host from my Mac, I get a warning : 

`setlocale : LC_CTYPE : impossible de changer le paramètre de langue (UTF-8) : Aucun fichier ou dossier de ce type`

This happens using ssh or /usr/bin/ssh

This is a well known "feature" of ssh who sends the environment variable LANG and LC_* from macos to linux and sets LC_CTYPE to UTF-8 which is unknown on linux.

Usual workaround in Terminal.app and iTerm2 includes disabling the environment variable transmission in preferences and setting the locale in the remote .bashrc or rely on the default configuration.

Additional context

An example of workaround site : https://en.stealthsettings.com/fix-macos-terminal-error-warning-setlocale-lc_ctype-change-locale-utf-8-file-directory.html

Most solutions are somehow based on disabling SendEnv on ssh_config level (requires root superpowers) or setting the prefs in Terminal.app or iTerm2

You must be logged in to vote
2 replies
@elviskahoro
Comment options

From @tekumara
On macOS I'm getting:

ssh remote
...
bash: warning: setlocale: LC_ALL: cannot change locale (en_AU.UTF-8)

This helps

LC_ALL=C.UTF-8 ssh remote
@hadifarnoud
Comment options

this is a bug, right? I did not get this on Terminal app

Comment options

🤔 is there any way to jump out of zsh if zsh is the default terminal on the remote machine?

All of my commands seem to be wrapped:

00~echo hello world01~
You must be logged in to vote
4 replies
@zheng
Comment options

Hey @richardpringle is your zsh version 5.0.8 or older? If so, this is a known issue and a fix should be coming out in the next few weeks.

@richardpringle
Comment options

Yeah, I'm running 5.0.2. It's not my remote server though and I don't have perms to update.

@zheng
Comment options

@richardpringle this issue should be fixed in the latest version of warp!

@richardpringle
Comment options

confirmed!

Comment options

image

After connecting over SSH i need to run `bash` to get the actual terminal prompt.
You must be logged in to vote
4 replies
@zheng
Comment options

Hi @kris-Nabis, you should check out the Honor PS1 setting. We don't honor PS1 by default, but we give you the option to opt-in!
Screen Shot 2022-03-08 at 1 50 53 PM

@kris-Nabis
Comment options

Thanks for the quick response, but that is something I've already enabled:
image

@zheng
Comment options

Ah got it. I found the bug on our side. We'll fix this!

@zheng
Comment options

This should be resolved!

Comment options

With today's update we've added some more SSH fixes. S/O to @zheng and @vorporeal

If you are still encountering SSH issues after today's update please open a new issue or even comment here and I'll triage!

Here are the list of fixes from the past 3 weeks!

  • SSH no longer hangs when /tmp is not writable for Zsh
  • SSH no longer bootstrap the shell if it’s not meant to be an interactive session (e.g. if -T or a command is passed)
  • SSH no longer returns 0~ and 1~ after executing commands for Zsh 5.0.8 or older
  • SSH now supports LocalCommand / RemoteCommand
  • SSH over Zsh no longer depends on configuring locales on the remote machine
  • SSH sources /etc/bash.bashrc which is an extra rcfile in Debian and other Linux distributions
  • Fix for SSH hanging when Zsh is the remote login shell
  • Fix for SSH with Zsh that would break with certain rcfiles because of incorrectly set
You must be logged in to vote
0 replies
Comment options

HI, is there a way to use Warp Terminal over SSH with grml-zsh-config?
Below is a working picture of grml-zsh-config when using SSH on iTerm:

image

However, after switching to Warp, grml-zsh-config no longer works, and its PS1/completion/etc.. is replaced with those from Warp.

image

Additionally, upon each SSH login a folder called warptmp.XXXXXX is created in home directory:

image

My questions:

  1. What is the warptmp folder for? I guess it should be created in /tmp instead of ~.
  2. Can I re-enable the PS1 & completion from grml while keeping the block-editing feature of Warp?
You must be logged in to vote
1 reply
@vorporeal
Comment options

To answer your questions:

  1. The warptmp folder is a folder where we create our own (theoretically temporary) set of rcfiles for zsh to bootstrap the shell to support Warp's block features; these rcfiles eventually load the user's rcfiles (effectively acting as a sort of pre-init script). This directory should get deleted as part of our bootstrapping; that doesn't seem to be working in your case. Flagging to @zheng who has looked into this some.
  2. We don't currently provide a way to pass through any fancy typeahead performed by the shell (such as the completions you're mentioning). We have a completions library covering a variety of common commands/tools, but systemctl doesn't seem to be in there yet. I believe we will eventually support community contributions to that library (to increase coverage and help ensure things stay up-to-date), but unfortunately I don't have a good answer for you on this one at the moment. :(
Comment options

Hello! I'm using zsh locally and when I ssh into my remote servers (which all use bash) I autostart a tmux session but I'm unable to type.

This is my .bashrc file on the remote server where I auto start a tmux session or reconnect to one if one already exists.

image

And I know that this screenshot probably isn't very helpful but after I ssh into the server everything looks fine but I can't type.

image

You must be logged in to vote
4 replies
@vorporeal
Comment options

Hey @bloveless, thanks for the report! We have an SSH wrapper that sets up the necessary environment for us to be able to provide features like blocks, and it currently doesn't play nicely with tmux. As a workaround, try disabling the use of the SSH wrapper (there's a toggle in Settings -> Features); I expect this will fix your issue.

We definitely want this to be a more seamless integration though - it's on our radar. :)

@bloveless
Comment options

Thanks for telling me about that setting. I found it on my own shortly after I posted this and it did fix ssh for me. That’s awesome to hear that it’s on your radar!

@coxley
Comment options

Might want to add remote tmux sessions as unsupported on the SSH Wiki. Extremely popular pattern to not lose work, and it didn't occur to me that it wouldn't be supported. :)

@elviskahoro
Comment options

Added your suggestion to our docs!

Comment options

Tab completion in a SSH terminal only available in current path, not support auto complete in sub path.
Example:
Before tab ls ./co , after tab ls ./code,it works.
Before tab ls ./code/my_file, after tab ls ./code/my_file, it not works, it should be ls ./code/my_file.txt.

You must be logged in to vote
2 replies
@johntaiko
Comment options

Same issue, lots of friction without path completion

@johntaiko
Comment options

I found that my ls has been aliased to ls --color=tty, when I unalias ls, it works

Comment options

We are a GCP shop, a lot of our ssh is done using the SDK due to IAP and os-login, rather than a direct SSH.
ex. gcloud compute ssh --tunnel-through-iap

Currently warp functionality does not appear to work with this type of SSH connection (which I imagine is intended functionality). Do you have plans to allow for SSH this way for GCP and other cloud provider tools?

You must be logged in to vote
0 replies
Comment options

I get a hang from ssh rails-prod1, where rails-prod1 is an ssh config entry that uses a ProxyJump that is also defined in the same file. This is with bash as my local shell on macOS Monterey 12.2.1.

You must be logged in to vote
1 reply
@HotFusionMan
Comment options

The above problem has been resolved, but I notice that if I Command-K while SSH'ed in to a remote host, the terminal session becomes unresponsive to any input. I end up issuing killall ssh in another local terminal session in order to get back control of the Warp tab.

Comment options

Hello there!
I am trying to directly connect to the bash shell on a WSL2 Ubuntu server, but it fails as follows:

/bin/bash: -c: option requires an argument
Connection to 172.27.254.143 closed.
You must be logged in to vote
1 reply
@elviskahoro
Comment options

@amadeusuzx Is this still happening to you? If so could you open an SSH Issue using this template?
https://github.com/warpdotdev/Warp/issues/new?assignees=&labels=&template=03_ssh.yml

Comment options

Hi all, just a quick question. Is this related to why when I ssh with Warp I cannot use pm2 but when I ssh from iterm (zsh) I have pm2 o remote server?

You must be logged in to vote
1 reply
@elviskahoro
Comment options

Yes! Can you open a new issue using this template: https://github.com/warpdotdev/Warp/issues/new?assignees=&labels=&template=03_ssh.yml

Comment options

When I enter warp and type ssh root@xxx to log in to the remote server (Ubuntu 20.04), the login welcome message (message of the day, MOTD) is not displayed, and I can't see the usage information of the server. In addition, do all aliases not work? I type ll, but it tells me that the command not found. However, there is no such problem when I use any other terminal, such as the terminal of MacOS. This is ridiculous, or do I have a deviation in my understanding of the use of Warp?

The following image shows ll: command not found, and it didn't show motd.
ll not found

But these aliases do exist.
but alias exist

You must be logged in to vote
9 replies
@LouisTay
Comment options

OK thanks. I have another question. When I try SSH'ing to the VPS, warp doesn't show the login message, is that a feature or bug?

Normally it is shown as below:

motd

@zheng
Comment options

This is a bug

@wihodges
Comment options

Is this still a bug? Not seeing the login messages with warp

@elviskahoro
Comment options

Still a bug!

@wihodges
Comment options

Ok, so a fun hack:
1 ) SSH into server
2) nano ~/.bash_profile
3) add run-parts /etc/update-motd.d/ save.
4) Exit ssh and relogin. May or may not need sudo before 'run-parts' and it should show you the intro messages.
There is also an 'uptime' command that can be added to bash. I couldn't find any short command that just shows how many packages need to be updated and whether system needs a restart.

Comment options

Hi, I’m having a strange issue when connecting to a VPS over SSH. Regular commands work as normal (ls, cd, mkdir etc), but when I run php -i I get a tonne of extra output from errors that I guess must be related to Warp’s SSH wrapper. I’m happy to provide additional info that would help debug this if anyone can advise what’s needed 😄

I’m not sure if this all stems from the lack of permissions to create ~/.bash_history. I appreciate that’s quite unusual, the VPS provider in question has a few... let’s say “quirks”.

This is the end of the php -i output and the beginning of the extra stuff I’m not expecting. There’s a lot of output below this 😅

Screenshot 2022-04-22 at 15 18 11

You must be logged in to vote
1 reply
@zheng
Comment options

Hmm it seems like php -i is printing all the environment variables and SSH_ORIGINAL_COMMAND ends up being our SSH wrapper command, and the terminal subsequently interprets this device control string sequence when this is printed out - so it attempts to bootstrap the session.

I think @gagata actually submitted a patch for next week's release that might prevent that from happening! Should be available on Wednesday.

Comment options

It does not work with fish shell.

You must be logged in to vote
0 replies
Comment options

just move this issue #1171 to here.

Discord username (optional)

No response

Local Shell and Version

5.8

Remote Shell and Version

4.2.46(2)-release

Operating System and Version

macos Monterey v12.3.1 and CentOS Linux 7 (Core)

I have tried commenting out my system & user rcfiles and warp still will not bootstrap

  • Yes

Screenshots

This is my ssh config.

Host xxx
   Hostname xx.xx.xx.xx
   Port xx
   Userxx
   RequestTTY yes
   RemoteCommand cd /xx
   ServerAliveInterval  10
   ServerAliveCountMax  5
   ProxyCommand nc -v -x 127.0.0.1:10086 %h %p

image

If I delete the line RemoteCommand cd /xx, warp will works.


The Warp SSH Wrapper is enabled.

image

Include shell xtrace output

Cannot execute command-line and remote command.

You must be logged in to vote
3 replies
@CamJN
Comment options

Warp needs to add the ability to run when you have your own remote command set, until they figure that out a cludge would be for them to add -o RemoteCommand=none to their ssh commands, which would disable your command but let their stuff work.

@elviskahoro
Comment options

@pys1992 we can keep the issue in #1171 actually. This discussion was made primarily for when we were doing an initial V1 of SSH Support.

@elviskahoro
Comment options

@CamJN just added your comment to that GitHub issue as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Converted from issue

This discussion was converted from issue #41 on December 06, 2021 23:20.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.