Terminal Question

freaky

OSXer
I was wondering if there's anyway to save the login information for a server in Terminal so I can just click the server name and it will automatically log in with the username/password. I am currently just opening a new shell and typing ssh domain.com the entering my login name and password. When I used Winblows, I used SecureCRT which had this feature so I'm hoping Terminal has something similar.
 
yeah, you could make an alias like:
alias ssfoo=ssh someuser@foo.bar.baz

put that line in your .bashrc, and then in any new terminal sessions, you'll just have to type ssfoo to get the effect of the shortcut.

Or, you could save a .term file (save as in file menu), and give a specific command to execute, like "/bin/ssh user@foo.bar.baz". Save that on your desktop, and then just double-click it to open a new terminal window and connect automatically.

Or, I just noticed this, it seems new in 10.3's terminal - there's an option in the file menu, connect to server. Play around with that, see what shortcut info you can save there. I'm probably going to play around with it as well...
 
Is there anyway that I could include the password so when I either type in the alias or click on the link, it will automatically log me in without asking for a password? Maybe something like username:password@site.com?
 
freaky said:
I was wondering if there's anyway to save the login information for a server in Terminal so I can just click the server name and it will automatically log in with the username/password. I am currently just opening a new shell and typing ssh domain.com the entering my login name and password. When I used Winblows, I used SecureCRT which had this feature so I'm hoping Terminal has something similar.
use iTerm http://iterm.sourceforge.net/ which will allow you to create multiple bookmarks for different logins to different machines. Configure each bookmark to login using ssh by using the -e /usr/bin/ssh switch.

Create public/private keys for SSH and move your public keys to the remote servers.

You can then SSH to the remote server and not be asked for your password/pass phase. Just open the desired bookmark which points to the desired remote machine and you're logged in.
 
fbp_ said:
.netrc ?

Ive never used it with ssh though so Im not sure, check man pages

Not used with SSH, why you ask?

Can you say unsecure? I thought you could :D
 
I tried messing around with the Connect To Server section in Terminal and the only thing I could get it to do was select the name I would log in with and the hostname. If anybody knows anyway that I can make it so I can log in without having to type my hard to remember password each time in Terminal (besides using iTerm) I'd appreciate it.
 
Back
Top