Welcome to WebmasterWorld Guest from 54.147.44.93

Forum Moderators: travelin cat

Message Too Old, No Replies

Terminal and logging in to server.

     

Jesse_Smith

6:11 am on May 26, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is there any way to store the server log-in info in Terminal so you don't have to enter

ssh root@IP-ADDRESS
*password*

every time you want to log-in? So that instead of having to enter the info and password every time, when you open it, you just automatically log-in.

travelin cat

2:51 pm on May 28, 2010 (gmt 0)

WebmasterWorld Administrator travelin_cat is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I'm not aware of anyway to do this, in fact I would think that Apple would not want you to be able to do that for security reasons.

I rarely use Terminal, but could you not just create a text file with the info and keep it handy to copy and paste? Or perhaps use one of the utilities like QuicKeys that allows you to assign hot keys?

lak12

11:48 pm on Jun 21, 2010 (gmt 0)

10+ Year Member



If you're logging as root to your webserver - you're asking for trouble.
Create an regular user, login and then "su" if you really need to do some stuff!

To answer your question - I personally not aware of the mechanism on Mac to remember ssh login info. It's probably not there for security reasons.
Although you can use AppleScript app (and keep it in 128-bit password protected image) to log you automatically to your server. It will open your terminal, log you as regular user and then "su". All automatic! Imagine that!
If you need help with AppleScript - PM me.
Regards,
Mark.

lak12

3:49 am on Jun 22, 2010 (gmt 0)

10+ Year Member



Just decided to publish the AppleScript, so if you need it, just copy it from:
[CodeMacs.Com ]
Regards,
Mark.

MichaelBluejay

2:33 pm on Jun 22, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh, there's an easy way to do this: Just create an alias.
alias login="ssh user@example.com"

After that, you can just type "login" to log in.

That won't survive sessions, though. To make it permanent, add that command to the file at /users/username/.tcshrc/. If that file doesn't exist, create it. To load it after you created it, type "source .tcshrc". It will load automatically in the future.

timster

5:25 pm on Jun 29, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can log in without a password by configuring a ssh public/private key pair, directions here:

[panix.com ]

Pairing that with @MichaelBluejay's tip makes it even easier.

Logging in directly as root is a big security vulnerability, but that is a configuration issue on the server.

optik

6:36 pm on Jul 1, 2010 (gmt 0)

5+ Year Member



What is the problem with logging in with root?

timster

4:16 pm on Jul 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is the problem with logging in with root?


For starters, the bad guys just have to guess 1 password and they own your box.

Here is some good discussion on the issue:

[fixunix.com ]
 

Featured Threads

Hot Threads This Week

Hot Threads This Month