So I messed up my bashrc. I forgot exactly what I did, but when I logged in, my shell would crash. ARG!! So I had to somehow log in and fix it, even though logging in was the problem to begin with. Searching the interwebs revealed a few solutions, but the one that worked was:
ssh jkeam@host -t "bash --noprofile --norc"
AddThis
Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts
Friday, April 6, 2012
Wednesday, August 31, 2011
Easy SSH and Cygwin
SSH-ing into a remote machine (that's running an SSH server) is super easy, but can be a major pain having to input the password over and over. This is especially true on a Windows machine. You can use putty, but I prefer using Cygwin because I get all my favorite linux utilities :) Here's how to make all that work:
Setup
source ~/.keychain/${HOSTNAME}-sh
Usage
To get be able to log in to the remote machine, simply append the contents of your local ~/.ssh/id_rsa.pub to ~/.ssh/authorized_keys on the remote machine (create the file on the remote machine if it does not exist). *If the authorized_keys file doesn't exist, create it and make sure that the permission is at least 700!
Config
If you typically ssh using another user, or want to setup an alias to be able to quickly ssh somewhere, you can configure ssh to do this. Simply vi ~/.ssh/config (create the file if it doesn't exist) and model your entries after the following:
Now to be able to ssh into server.fully.qualified.name as the admin user, simply type in:
ssh admin@server.fully.qualified.name
Setup
- Download and install cygwin with the openssh and the keychain package
- Run cygwin
- Enter in the terminal:
- ssh-keygen -t rsa
- choose some password, and enter it again to confirm
- vi ~/.bashrc and put this at the button of the file:
source ~/.keychain/${HOSTNAME}-sh
Usage
To get be able to log in to the remote machine, simply append the contents of your local ~/.ssh/id_rsa.pub to ~/.ssh/authorized_keys on the remote machine (create the file on the remote machine if it does not exist). *If the authorized_keys file doesn't exist, create it and make sure that the permission is at least 700!
Config
If you typically ssh using another user, or want to setup an alias to be able to quickly ssh somewhere, you can configure ssh to do this. Simply vi ~/.ssh/config (create the file if it doesn't exist) and model your entries after the following:
Host server
Hostname server.fully.qualified.name
User admin
Now to be able to ssh into server.fully.qualified.name as the admin user, simply type in:
ssh server
whereas before you had to type inssh admin@server.fully.qualified.name
Subscribe to:
Posts (Atom)