|
|
Correct way to log out of a ssh session.
|
|
|
|
Grizzled Veteran
Join Date: May 2001
Location: Ca
Status:
Offline
|
|
Hows it going I just got ssh going on a server I run for backups and other things(mostly stuff I need but dont want it on my powerbook. I have been able to connect to the server via ssh but I have a weird feeling that just quitting the terminal or closeing that terminal window doesn't do the right thing to close that session(maybe not). Any help would be great.
Second part of the question,
I want to be able to ssh into the server from say work, I have a router so I need to open a port for ssh, which is that, also I would like to FTP in to the server from a remote location. any thoughts on that would be great.
Thanks for the time
REAL
|
With some loud music + a friend to chat nearby you can get alot done. - but jezz, I'd avoid it if I had the choice---- If only real people came with Alpha Channels.......:)
AIM:xflaer
deinterlaced.com
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Dec 2002
Location: Newport Beach, CA
Status:
Offline
|
|
Hows it going I just got ssh going on a server I run for backups and other things(mostly stuff I need but dont want it on my powerbook. I have been able to connect to the server via ssh but I have a weird feeling that just quitting the terminal or closeing that terminal window doesn't do the right thing to close that session(maybe not). Any help would be great.
type:
logout
Also type 'logout' before you close/quit the terminal
Second part of the question,
I want to be able to ssh into the server from say work, I have a router so I need to open a port for ssh, which is that, also I would like to FTP in to the server from a remote location.
look here
ssh is port 22
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Apr 2000
Location: Durham, NC
Status:
Offline
|
|
Typing "exit" at the remote prompt that you get from an ssh session will close your session and return you to your local shell. Closing your terminal window will end your session just as well, though.
As for remote access, you would need to open up port 22 on your router. I would recommend using scp for your remote file transfer needs instead of ftp. It also runs on port 22, since it is a function of ssh.
However, if you want to use ftp, you will want to open up port 23.
Kyle
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Nov 2001
Location: Adelaide, South Australia
Status:
Offline
|
|
One thing to note re the "close window" or "type exit" choices: I'm pretty sure that simply closing the window won't allow your command history to be written to the appropriate file, while typing "exit" (or "logout") will. If you want to revisit your command lines then this might be a good reason to use the "exit" approach.
(This behaviour will probably vary shell to shell: my memory is welded to tcsh's behaviour, but my heart belongs to zsh, which has a better approach to command line history.)
Cheers,
Paul
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Nov 2002
Location: Rouge River
Status:
Offline
|
|
Originally posted by EnVoy:
[B]type:
logout
Also type 'logout' before you close/quit the terminal
Or even better, type control-d. A nice shortcut.
|
Swimming upstream since 1994.
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: May 2001
Location: Ca
Status:
Offline
|
|
Originally posted by EnVoy:
type:
logout
Also type 'logout' before you close/quit the terminal
look here
ssh is port 22
Thanks for the info and the link. Have a good one
REAL
|
With some loud music + a friend to chat nearby you can get alot done. - but jezz, I'd avoid it if I had the choice---- If only real people came with Alpha Channels.......:)
AIM:xflaer
deinterlaced.com
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status:
Offline
|
|
ftp sends your password in the clear (not good). sftp is an ftp-like protocol, except that it's secure. Fugu is a free, open source, GUI file transfer client. Still in beta, and a little quirky, but it gets the job done.
Also, you might want to look at rsync, which can move files via an ssh tunnel.
Edit: For clarity.
(
Last edited by Rainy Day; Mar 29, 2003 at 01:04 PM.
)
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status:
Offline
|
|
Originally posted by kcm3:
However, if you want to use ftp, you will want to open up port 23.
Oops, no.
Port 23 is telnet
FTP uses ports 20 and 21
For a complete list of the standard ports, check the services list.
|
Gods don't kill people - people with Gods kill people.
|
|
|
|
|
|
|
|
Junior Member
Join Date: Apr 2000
Location: Durham, NC
Status:
Offline
|
|
Originally posted by Camelot:
Oops, no.
Port 23 is telnet
FTP uses ports 20 and 21
For a complete list of the standard ports, check the services list.
whoops, yep. brain fart. that'll teach me to re-read my posts, huh?
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Apr 2000
Location: Woodridge, IL
Status:
Offline
|
|
Originally posted by Camelot:
Oops, no.
Port 23 is telnet
FTP uses ports 20 and 21
For a complete list of the standard ports, check the services list.
FTP only uses that for the control connection - the data connection uses random high ports.
If you want the FTP session encrypted, I strongly recommend using either sftp or ftp-ssl, and not to try to run plain FTP through SSH. It's very difficult to begin with, and bugs in OS X's FTP server (lukemftpd) cause problems with passive port ranges (those who know what's involved with FTP through SSH will understand).
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Dec 2002
Location: someplace
Status:
Offline
|
|
Originally posted by diamondsw:
FTP only uses that for the control connection - the data connection uses random high ports.
Not exactly true. On the server end, ctive mode FTP uses port 21 for the control connection, port 20 for the data connection. On the client end of things, a random port (n) > 1024 is chosen for the command connection, and (n+1) for the data connection
Passive mode uses port 21 for the command connection, then chooses a random port > 1024 for data. The client uses a random port (n) > 1024 for the command connection and n+1 for data.
For diagrams and a more in-depth explanation see this link:
Active FTP vs. Passive FTP, a Definitive Explanation
http://slacksite.com/other/ftp.html
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Nov 2002
Location: Santa Barbara CA
Status:
Offline
|
|
Originally posted by Paul McCann:
One thing to note re the "close window" or "type exit" choices: I'm pretty sure that simply closing the window won't allow your command history to be written to the appropriate file, while typing "exit" (or "logout") will. If you want to revisit your command lines then this might be a good reason to use the "exit" approach.
(This behaviour will probably vary shell to shell: my memory is welded to tcsh's behaviour, but my heart belongs to zsh, which has a better approach to command line history.)
Cheers,
Paul
If I am running something on one of my linux boxes in the background, say I had to start up distributed folding by hand, and I just close the window it kills those background processes. If I type exit then they continue to run.
And I use and like scp for copying things between machines.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status:
Offline
|
|
Incidentally, to be able to start an *interactive* process via SSH, then disconnect and be able to reattach to it later, check out screen, which is built-in to Linux, BSD, and OS X.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|