How to get ZSH prompt when SSHing [closed] - macos

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I currently have zsh and oh-my-zsh installed with homebrew on my osx workstation. Everything works fine, it is using the correct path (/usr/local/bin/zsh) and changes made in ~/.zshrc such as aliases are working.
My problem is, when I ssh into an ubuntu server, there is no zsh prompt and nothing (zsh related) in ~. Is there something I need to do in order to make zsh work on remote servers?
Thanks!

Install zsh on the remote server (e.g. apt-get install zsh)
You'll want to push (i.e. scp -rp) the following files/directories to the remote server:
~/.zshrc
~/.oh-my-zsh/
You'll need to change your remote user's default shell to zsh (e.g. run chsh /bin/zsh on the remote server)

Related

Problem ssh connection Macbook as host to Debian VirtualBox [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I meet some problem while connected thru ssh to a Debian Virtualbox from a MacBook Pro.
I success to connect in ssh but some commands don't work from Macbook terminal and I don't understand why.
For example halt -p or a2ensite works directly on the VirtualBox screen but not thru ssh connection from MacBook terminal.
Is it related to the fact that Debian use bash and Macbook use zsh ?
I think I miss something here.
Thanks for your help !
I found the answer. I will be very interested if someone can explain to me why.
But after change zsh to bash on my MacBook:
chsh -s /bin/bash
Then restarting my laptop.
I started the VirtualBox and connect to it in ssh.
And all commands are now working.

Ssh from Ubuntu to Windows 7 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I was just about to try sshing for the first time and before I get into it, I want to know what's the best way to go about it. In particular, I'm currently running Linux through crouton on an HP chromebook and I want to ssh into and old windows 7 pc. Ideally I would love to have some sort of bash shell inside the windows ssh as I'm not so confident with cmd but I can make do. Are there any packages/apps that I should install on my old pc before I start trying. Preferably if there was something like WSL but for windows 7 that'd be great but I can't seem to find anything like it.
there is no ssh daemon (service) for windows from Microsoft.
So installing shell on windows, it is only about run it locally.
To connect with ssh on remote windows, you should install 3rd party ssh server on windows.

Want to call windows applications from vim under cygwin [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I have vim and mintty installed with cygwin.
Have some aliases in bash profile, they work in terminal.
Then I call :!bash from vim, I have the same mintty terminal, but have to source .bash_profile again.
My original intent was to call command :!chrome %
In order to save some overhead, the default shell used by Vim to invoke external commands (i.e. via :! {cmd}) is a non-interactive one; it doesn't read the usual initialization files.
If you want to use shell aliases, you can reconfigure Vim to start an interactive one (adding the i flag):
:set shellcmdflag=-ic
Aliases are typically defined in .bashrc; however, you mention .bash_profile. That one is only read for login shells, so either move the alias definitions, or start an (even slower) login shell by supplying the l flag in addition to i.

mac terminal alias set up password [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I want to create alias to reboot computer. Tried to set alias reboot='sudo reboot'. But it required to enter password. I want to know is that possible to put the password into this alias.
No, you can not put the password in the alias. sudo prevents this because it's a huge security hole.
Instead, run sudo visudo and add the line
yourusernamehere ALL=(ALL) NOPASSWD: /sbin/reboot
then your current alias will stop asking for a password and just allow the reboot.
You can create an alias like this
alias odo2='echo ROOT_PASSWD | sudo -S reboot'
Even better put all your aliases inside
~/.bash_profile
[This #2 would work if your have not changed your terminal login preferences to a different shell... Most probably your login shell would load up bash]

Why is my shell changing when I use 'sudo'? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
When I run sudo su on my mac os x (10.8.5) MacBook Air, the shell changes for some reason:
bos-mp2o6:~ rabdelaz$ sudo su
Password:
sh-3.2#
What's up with that?
The only thing I've done is install Heroku Toolbelt and, after getting sudo: unable to cache user root, already exists, rebooting.
When you use sudo su, it runs the superuser's .bashrc, so you get its prompt instead of your own.

Resources