Welcome to WebmasterWorld Guest from 54.158.195.221

Forum Moderators: travelin cat

Message Too Old, No Replies

Terminal and logging in to server.

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 5, 2003
posts:807
votes: 0


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.
2:51 pm on May 28, 2010 (gmt 0)

Moderator This Forum from US 

WebmasterWorld Administrator travelin_cat is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Feb 28, 2004
posts:3225
votes: 12


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?
11:48 pm on June 21, 2010 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 7, 2001
posts:48
votes: 0


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.
3:49 am on June 22, 2010 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 7, 2001
posts:48
votes: 0


Just decided to publish the AppleScript, so if you need it, just copy it from:
[CodeMacs.Com ]
Regards,
Mark.
2:33 pm on June 22, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 12, 2003
posts:1199
votes: 0


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.
5:25 pm on June 29, 2010 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 1, 2003
posts:815
votes: 0


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.
6:36 pm on July 1, 2010 (gmt 0)

Full Member

10+ Year Member

joined:Aug 17, 2007
posts:320
votes: 0


What is the problem with logging in with root?
4:16 pm on July 2, 2010 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 1, 2003
posts:815
votes: 0


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 ]