[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

accessing linux server

I have this network admin that has given me instructions to upload my working documents to a linux server with my password and user name in the form of blabla@blablaserver:bin...everything worked fine for about 4 months...i was using secure copy  for file transfer to bin and accessing bin to organize bin with putty.exe from windows 7.  Well last night i upload files and go to putty and get access denied.  I email admin and he says "someone loaded gigabytes to the server so he shut down sftp without notifying me of course!!!....Just how the hell many times can i type a password...You guessed..more then i can keep track of... Ok that's the explanation for no putty access...and I ask him how does he want me access bin and he emails me back and say's use "ssh"..well i am not into linux and the first question is can he leave sftp open for me and not for someone else...i would like an answer to that question???..Next thing he says is "use ssh"...well i went into my unbuntu client and typed ssh log@servername and no access... so my question is and giving this guy the benefit of the doubt...how can i access bin from my windows machine with sftp shut down using the SSH...thanks in advance...I am not a linux guy ...
0
10023
Asked:
10023
  • 10
  • 8
1 Solution
 
xtermCommented:
If your login still exists, you should be able to do a standard shell login using ssh via putty, or any ssh program of your choice.  This is critical of course that you can still log in.

If you can still log in, then after you get connected via ssh, you will have a command prompt that looks a bit like a DOS window.  From there, you can use the "ftp" command to FTP outbound to any FTP server that you have write access to, and upload your files.  Then from your normal workstation, FTP back to that 3rd party FTP server and download your files.

You might also ask the admin if he has the UserDir function turned on in his web server.  If this is the case, when you log in via SSH, you can create a folder called "public_html" and move all your files that you need to retrieve into that folder (you use the "mv" command to do this).  Then you can go to http://<ip address of remote ssh server>/~your_username/ and your web browser should show you everything that is in the public_html folder, and you can then download them.

I know it sounds complicated, but you can work through this.  If you start to try anything I've suggested and it doesn't work, just give me as much detail as possible, and I'll try to help you get unstuck.
0
 
10023Author Commented:

I get a login prompt using putty but I get access denied using the correct password.  I can upload files  using pscp.exe....but i need working access inside of my bin folder. which i used putty.exe for..now i get access denied using correct password...can i do that anyother way using ssh? and when he shuts down secure ftp can he shut it down by port or by user...?  In other words how valid is his reply..just use  Secure Shell
My job is to get the files up on the server and organize them in such away that others with authority can access the data..so tonight i am in kinda of a catch 22..no way to get my work done and no access to admin...i think i understand your response but can you tell me..Can I use another protoco thru another client  to access the bin using ssh without sftp??  txs for the info..
0
 
xtermCommented:
If pscp.exe works with your username and password, then that same u/p should work fine with putty.exe - they are in both using port 22 via the sshd instance running on the remote server.  Are you 100% sure you're using the same credentials for both, and they match in case too?
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
xtermCommented:
BTW, if I read you correctly, and his reply is to "Just use secure shell" then that is exactly what you're doing when you use putty.exe, presuming that you click the "ssh" radio button, and select remote port 22, and enter your username and password properly.

ssh = secure shell.
0
 
10023Author Commented:
I am using the correct credentials and here is the putty screen shot and i have had no problem for four months..i can type and read and all that...and use the cap key..i can type the password and check case..i know the problems wth L's, one's and I and i's and all that...I know how to toggle on and off numlock and i never unsuccessfully log in with the same password and login using pscp.exe...So i understand why you would ask..no problem but i am looking for a valid explanation for this event.  So i respect your opinion and I was wondering where you would put this admin...out back with the cows or on the phone talking to your mother...

 unaltered and original putty
0
 
xtermCommented:
Don't be insulted by this question then, but are you using the same hostname for both connections?

I need to know that for sure before I start saying bad things about your admin.
0
 
10023Author Commented:
yes, same hostname and same password....thanks
0
 
10023Author Commented:
remember from my previous host that he said he had to shut down sftp to prevent someone else from loading the server with too much data
thanks
0
 
10023Author Commented:
i meant previous post
0
 
xtermCommented:
Yep, so this is the deal.  sftp runs on port 115/tcp.  If this is indeed shut down, then it will fail if you do something like:

  telnet <hostname> 115

If you are actually still able to connect to this port (aka, your telnet session opens and gives you a weird looking prompt like this:

  Trying <ip of hostname>...
  Connected to hostname.
  Escape character is '^]'.
  SSH-2.0-OpenSSH_5.5

Then sftp is still open.  If it is closed, you should either get an endless hang, or an instant "connection refused" type message.

Now if scp is still open, so is ssh.  They both use port 22/tcp.  So you can verify the same thing as above by doing:

  telnet <hostname> 22

My guess is that will succeed.

Now the question is this - when you do successfully run pscp.exe, are you using any options to force which protocol you are using?  Because if you're using -scp and it works, then the ssh server should allow you to connect fine.  If you are using -sftp and it works, then sftp is still active, and your admin is incorrect (see http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter5.html, section 5.2.2.6)

Now my gut says that using the -scp option will work fine, and ssh is open.  What I really think might be happening when you log in via straight ssh is that it's using v1 instead of v2 or vice-versa.  What exactly is the error message that you are getting?  And did you get any results different to what I am guessing at above?

0
 
10023Author Commented:
pscp login
c:\ temp>pscp file.docx joe@server.org:bin
putty login is using port 20 and ssh as seen in the screen shot
[  telnet <hostname> 115] as suggested:
i used comand prompt: telnet joe@server.org:bin 115... and i get " 
cannot connect to host , on port 115: Connect failed.  ..this sounds like you instant fail message descrip

when i use the second telenet suggestion using 22 i can an identical message

When I use pscp and use the -scp switch I get "more then one remote host  not supported
when i use the -stfp switch get the same result as -scp
Now i am using the switch as very last entry at end of line after server name

When I use putty.exe after I login and get a cleartext password prompt I get the simple message "asses denied"  and to add to that when i use pscp with the same password and login i get file success or something like that but confirmation that it succeeded.
0
 
xtermCommented:
The screenshot above shows you using port 22, not port 20.  Which one are you using?   Port 20 is reserved for ftp-data and should not work.

You put the -scp in the wrong place if you got the "more than one remote host not support error".  It should look like:

  c:\temp>pscp -scp file.docx joe@server.org:bin

Please try it that way (and using -sftp too, in the same place as -scp above)

Hang in there buddy, we're getting closer.
0
 
10023Author Commented:
your right.. the screen shot is right.

with the -scp option in the right position i get  [test.txt:  No such file or directory]

with the -sftp I get  [ pscp: unknown option "-sftp]

thanks

0
 
10023Author Commented:
I am awake now and I found a mistake in my url in the pscp command line
I do get a login prompt
with -scp i [ i get log in prompt and then give password and get throw into the help files]
with -sftp i [ get log in prompt and then give password and thrown into the help files]
without any switches i get what was a successful upload to server showing
test    |0 kB | 0.4 KB/s  | ETA: 00:00:00: |  100%
0
 
xtermCommented:
So I still have some confusion:
- You said the screen shot is correct, so you're connecting to port 20?
- When you run the pscp command, does it ask you for a password after you hit <enter>?
- When using -scp or -sftp and entering your password, you say you get "thrown into the help files" - what does that mean?
0
 
10023Author Commented:
xterm..
My login prompt had changed in putty.exe...I had originally set up putty to load from the screen prompt preconfigured with the full url so I tried with just user name and it gave me a log in prompt without entering the full user name and server name and when i entered the password i got in....something changed here when admin shut down sftp..i still have not got a response from him and the earlier one did not make any sense so i will keep pursuing it.  I know i did not change the setting in putty.exe..i am careful about such things and remember I got a password prompt with full user name and server name...so it is the way that the server sees my username now which is different then before .. in other words  just username and nothing beyond the @ got me in...
thanks again xterm for all you help any additional comments which you think could be helpful
0
 
10023Author Commented:
thanks xterm
0
 
xtermCommented:
Glad it works, that is all that matters.

All I can add is that if you were logging in as user@domain.com in putty, it should have never worked - you always have to log in as just "user" at an actual login prompt on a ssh server.

If you do it from the command line (like from your Ubuntu server) then you can do "ssh user@domain.com" and then it will just ask you for your password at the prompt.  This is the identical thing as doing "ssh -l user domain.com".

Take care!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 10
  • 8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now